-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - OrthographicProjection: place origin at integer pixel with WindowSize scaling mode #4085
Conversation
Neat, I like it! Thanks for the solid explanation, |
… scaling mode One way to avoid texture atlas bleeding is to ensure that every vertex is placed at an integer pixel coordinate. This is a particularly appealing solution for regular structures like tile maps. Doing so is currently harder than necessary when the WindowSize scaling mode and Center origin are used: For odd window width or height, the origin of the coordinate system is placed in the middle of a pixel at some .5 offset. Avoid this issue by rounding the half width and height values.
Great work. Could you resolve the comments now @NeoRaider? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly stupid question: could this cause problems for entity pickers / mapping from screen to world space or so? I would guess not but maybe some plugin is making an assumption. I suppose it should be fixed there in that case. Barring that, great stuff!
bors r+ |
… scaling mode (#4085) # Objective One way to avoid texture atlas bleeding is to ensure that every vertex is placed at an integer pixel coordinate. This is a particularly appealing solution for regular structures like tile maps. Doing so is currently harder than necessary when the WindowSize scaling mode and Center origin are used: For odd window width or height, the origin of the coordinate system is placed in the middle of a pixel at some .5 offset. ## Solution Avoid this issue by rounding the half width and height values.
… scaling mode (bevyengine#4085) # Objective One way to avoid texture atlas bleeding is to ensure that every vertex is placed at an integer pixel coordinate. This is a particularly appealing solution for regular structures like tile maps. Doing so is currently harder than necessary when the WindowSize scaling mode and Center origin are used: For odd window width or height, the origin of the coordinate system is placed in the middle of a pixel at some .5 offset. ## Solution Avoid this issue by rounding the half width and height values.
… scaling mode (bevyengine#4085) # Objective One way to avoid texture atlas bleeding is to ensure that every vertex is placed at an integer pixel coordinate. This is a particularly appealing solution for regular structures like tile maps. Doing so is currently harder than necessary when the WindowSize scaling mode and Center origin are used: For odd window width or height, the origin of the coordinate system is placed in the middle of a pixel at some .5 offset. ## Solution Avoid this issue by rounding the half width and height values.
Objective
One way to avoid texture atlas bleeding is to ensure that every vertex is
placed at an integer pixel coordinate. This is a particularly appealing
solution for regular structures like tile maps.
Doing so is currently harder than necessary when the WindowSize scaling
mode and Center origin are used: For odd window width or height, the
origin of the coordinate system is placed in the middle of a pixel at
some .5 offset.
Solution
Avoid this issue by rounding the half width and height values.