-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cause of artifacts at certain zoom levels #21
Comments
If you are using non-integer scales you can get rounding errors. Not sure there is a good fix for this in WebGL1 unfortunately. Depending on what scale you're wanting to use you may be able to round or clamp the coordinates in the shader, but I'm not sure there is a general fix for all scales. |
I'm actually using webgpu, and looking at existing tile renderers to try to find a solution (since webl material is so prevalent) but I think the same concepts apply across both graphics apis.
hmm, that's interesting. Is there any way of determining what scales would be problematic? I'm also considering maybe drawing everything to a texture at 1X scale, and then up or downsampling that texture into the frame, but that seems like a PITA in that I'd have to resize the offscreen texture every time the zoom level changes. |
WGSL has integers, most of the floats in the gl-tiled shaders should be integers (which don't exist in GLSL ES 1.0). Switching those over would likely help.
Not sure, I haven't thought about this problem space in ~3 years? |
True, though most of the floats are related to texture sampling, and those have to be floats I assume, right?
Oh...well, sorry. Definitely not trying to pester you. Just figured this might be relevant to both of our repos. |
Not a pestering for sure, just unfortunately I don't think I have good answers for you :) |
When I zoom the tileset, I see artifacts at various points, little lines at what I think are the edges of the tiles:
I'm guessing this has to do with rounding errors when the scale is set to particular floats?
How would one go about fixing this?
The text was updated successfully, but these errors were encountered: