I’m pixelating a gradient noise that is applied to an outline shader, but I’m having a hard time figuring out how to match the resolution of the pixelation to the resolution of the sprite itself.
(The resulting pixelated UV is connected to a gradient noise outside of the screenshot)
As you can see, using the sprite height makes the pixels match in height but not in width, while using width leads to inverse results.
I’m trying to figure out a way to get the pixels to match any sprite that the shader is applied to. Achieving my desired effect is easy on a square sprite, but a rectangular sprite is where I get lost on how to do it. (In this example, the sprite is 64x80)
Thanks in advance.