Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RandomGamingDev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tilemap rendering incorrectly when positioned exactly on .5
2 participants