-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SampleFill faulty rendering on different browsers #18
Comments
Im fairly sure this is relating to the tiling. When the tiles do display they display correctly along all longitudes but only on 90deg section along the latitude. Strangely the latitudes are different on different browsers. 90N to 0 in firefox and 45N to 45S in chrome and edge. My guess would be computeLoadableTiles() as it is overriden in particles which is functioning as expected. |
There's quite a lot going wrong with this. I've identified definite issues with the tile calculations in layer.computeVisibleTiles() but even when fixing this the problem persists. I'm convinced this is a shader issue, possibly relating to the reprojection functions, but my GLSL skills are sketchy at best. |
Yeah I've noticed that as well. TBH I'm fairly convinced that some of these issues might even be in mapbox itself, although it's hard to prove. I've even seen inconsistent behavior based on different screen sizes. As a workaround, it's probably best to specify a reasonably high min-zoom. |
I can confirm this bug is in the Projections in the Shaders. Changing the vertex position to worldCoordsWGS84 from worldCoordsMerc extends the tiles the full lat range but puts the projection out. Might need someone with a better understanding of the code to look at this.
|
So i managed to find a pretty nifty little hole/hack in the mapbox-gl source code which allows me to use the built in mapbox tile system to feed textures to custom shaders from a custom layer. I've created a repo with a simple demo, this would be a good fit with this project and would eliminate many of the alignment and browser related issues. Mapbox takes care of all texture loading, tile matrix calculations, projection and tile caching which will reduce the code base significantly. |
I found those hacks as well, but in this case we are using unprojected data, so the tiles end up being different. |
Ahh ok of course. I'm using a tile server which is doing it on the fly. I'm sure there would be plenty of py modules that could do the projection in pre-processing? Anyway ill leave it for now 👍 |
Of course, but some of the math seemed easier to do correctly in WGS84 than in Mercator. Having now done the project, I think I might reconsider that decision, but at the time it seemed like a reasonable choice. |
Tiles are not rendering at certain positions and zoom levels on different browsers. Seems to be fairly random. Can be reproduced using the current demo at https://astrosat.github.io/windgl/
The text was updated successfully, but these errors were encountered: