Giter VIP home page Giter VIP logo

Comments (8)

maeneak avatar maeneak commented on May 22, 2024

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.

from windgl.

maeneak avatar maeneak commented on May 22, 2024

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.

from windgl.

gampleman avatar gampleman commented on May 22, 2024

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.

from windgl.

maeneak avatar maeneak commented on May 22, 2024

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.

    v_tex_pos = worldCoordsWGS84;
    gl_Position = u_matrix * vec4(worldCoordsWGS84, 0, 1);

from windgl.

maeneak avatar maeneak commented on May 22, 2024

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.
Ill be using this method in my own project but will try to throw some time at a branch of the current master and post if i make some progress. This would obviously require a revamp of the py generator code (not my forte) but ill try to use static tiles from a WMS source as test data.

from windgl.

gampleman avatar gampleman commented on May 22, 2024

I found those hacks as well, but in this case we are using unprojected data, so the tiles end up being different.

from windgl.

maeneak avatar maeneak commented on May 22, 2024

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 👍

from windgl.

gampleman avatar gampleman commented on May 22, 2024

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.

from windgl.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.