-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Sprite "crunch" when placed in certain positions on screen #84632
Comments
This is due to sampling issues and non-pixel positions, does this go away if you enable I'd say this is largely hard to avoid due to rendering and sampling |
This specific issue disappears with this setting, but it also introduces a lot of different ones. |
Can you try following the same steps on previous 4.2 dev/beta builds? You can download them here. Also check if this occurs with 4.1.3 (not just 4.1). |
I should've mentioned I tested it on 4.1.3 and not 4.1, my bad And this happens as early as 4.2 dev1 |
I managed to fix your issue simply changing Project Settings/Display/Window/Stretch/Mode from "viewport" to "canvas_item", take a try. 😉 |
@Araraura Try this: Ensure that your spritesheet texture has even dimensions (like 48x16 instead of 49x17) and that each frame of animation also has even dimensions (like each frame having 16x16 instead of 16.333.x17). As a last resort, you could set the centered property to false and see if it makes any difference. I've been ensuring that every number is even (including collision shape dimensions) for so long that I usually forget about the consequences. |
I could reproduce the "issue" on Godot 3.x, when the camera is at 1x and when I deactivate Capture.video.du.2023-12-20.13-58-23.webm@AThousandShips is pretty spot on with the issue at hand:
The only difference here between Godot 3.x and Godot 4.x, it seems, is the order of operations. It appears like that Godot 3 scales from Godot 4 instead positions the sprite first at half a pixel, then scales the result. Hence the weird sprite state. @clayjohn, does something ring you a bell? |
Fixed by #87297. |
Godot version
v4.2.beta5.official [4c96e96]
System information
Godot v4.2.beta5 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 XTX (Advanced Micro Devices, Inc.; 31.0.22023.1014) - AMD Ryzen 9 7950X3D 16-Core Processor (32 Threads)
Issue description
In 4.2, there is an issue mostly visible on pixel art games with small resolutions that scale up to larger screens. While the game is running, moving sprites to certain places in the screen will cause the sprites to appear uneven or "crunched", and it's usually more noticeable if the sprite is animated.
Window settings:
This seems to happen when moving the position of the sprite to X.5.
This happens in all 3 renderers.
This issue does not occur in Godot 4.1.3.
This issue occurs as early as 4.2 dev1.
Note: I'm using a 4K monitor with Windows scaled up to 175%.
Steps to reproduce
Minimal reproduction project
SpriteCrunchIssue.zip
The text was updated successfully, but these errors were encountered: