godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix for Tilemap rendering incorrectly when positioned exactly on .5 and other texture issues

Open RandomGamingDev opened this issue 1 year ago • 0 comments

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): image
  • Now (works and renders properly): image

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.

RandomGamingDev avatar Oct 06 '24 16:10 RandomGamingDev