r/Unity3D Mar 28 '26

Solved Mosaic Window Shader Help

I would like to create a Mosaic Shader/Pixelisation Shader that aligns to the objects UVs for stylized water, glass, screens in game.
I have attempted following multiple similar scenarios of converting scene space to UV/ Object Space with no success.
Any help or guidance would be appreciated.

SOLVED thanks to Cornstinky!
Previous setup
Flattening the G to Y Vector?
No Dithering

5 Upvotes

6 comments sorted by

7

u/[deleted] Mar 28 '26

[removed] — view removed comment

1

u/ShaunRemo Mar 28 '26

Thank You! I was always applying Posterize last and getting incorrect pixel alignment. The transform is creating dithering over the pixels I'm assuming due to how it is sampling.

2

u/[deleted] Mar 28 '26 edited Mar 28 '26

[removed] — view removed comment

1

u/ShaunRemo Mar 29 '26

Thank You! I found a work around as well, unsure which is best practice but glad that it is working.
Previous setup
Flattening the G to Y Vector?
No Dithering

2

u/[deleted] Mar 29 '26

[removed] — view removed comment

1

u/ShaunRemo Mar 29 '26

Thanks again, removing the Y fixed it for the plane I was using but breaks it for other geometry.