godot
godot copied to clipboard
Fix for Tilemap rendering incorrectly when positioned exactly on .5 and other texture issues
Fixes: #76517 and many others including ones detailed in the comments of it including issues outside of Tilemaps/Tilesets like Sprite issues
More sorting will likely be required to find which issues get solved by this though.
Minimal reproducable example provided by #76517:
- Originally (offset wrongly when not at an exact pixel measurement whether it's because the camera's at 0.5 or the tilemap is):
- Now (works and renders properly):
It offset the UV in the vertex shader to deal with precision issues without use_pixel_snap needing to be enabled. I decided to do this to minimize the amount of change required in this PR by going down this route, although I can make some larger changes to the internal functions to get it to instead use use_pixel_snap if the Godot team decides that that would be a better choice.