-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Visual tearing with ImageFilterMode::Nearest #16773
Copy link
Copy link
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Bevy version
0.15.0What you did
When
ImageFilterMode::Nearestis set as the default sampler, tearing occurs to text, sprites, etc. when the window resolution is an odd number (101x303, etc.). You can test by spawning a sprite and then resizing the window:The notable exception is that it doesn't happen to sprites with dimensions that is the power of two (
512x256, etc.).You can test a more elaborate, interactive reproduction here: https://github.com/musjj/nearest_filter_bug. Slowly and gradually resize the window and you should be able to see the artifacts popping in and out.
What went wrong
Visual tearing occurs.
Additional information
An example of no tearing:
An example of tearing:
A closeup of the tearing (the lines are supposed to be perfectly straight):