166
Graphics / Re: TextureRect sometimes rendered wrong
« on: June 06, 2022, 10:46:27 pm »
One method I've seen done is add padding around each sprite in a sprite sheet with a repeat of the edge pixels, so if they bleed over they have the same colour (or transparency) as what they bleed onto, so there's no effect.
Other engines (like Unity) can have this happen too.
https://answers.unity.com/questions/1566057/unity-2d-sprite-bleeding-glitch.html
https://stackoverflow.com/questions/15023158/how-to-prevent-pixel-bleeding-from-rendering-sprite-sheet-generated-with-zwoptex
Or a custom pixel shader should be able to force sampling from the texture rectangle.
Other engines (like Unity) can have this happen too.
https://answers.unity.com/questions/1566057/unity-2d-sprite-bleeding-glitch.html
https://stackoverflow.com/questions/15023158/how-to-prevent-pixel-bleeding-from-rendering-sprite-sheet-generated-with-zwoptex
Or a custom pixel shader should be able to force sampling from the texture rectangle.