- Home /
How would you go about making a retro pixel image shader?
As you may guess I'm new to using Unity Shaders. I've been looking online, but most of the examples I've found were either not what I was looking for or didn't have any sort of download link. So I was wondering if it'd be possible to make a retro-esque image effect by:
1) Dividing the screen into "n" rows and "m" columns, essentially making a grid
2) Taking the average color value of pixels within each box of the grid
3) Outputting said average color onto the player's screen in place of the box in the grid
Any help would be much appreciated. And even if this isn't possible that'd still be a load off my mind.
$$anonymous$$ake the camera render to a RenderTexture that has the required dimensions (like 320x200) and apply that texture to any renderer's material, for example the renderer of a RawImage UI component. Search for pixelation script to find examples of this pretty common solution.
It does't work. I've been trying to do it for hours, and there is no configuration of your answer that even remotely works. If you've got any other ideas I'd love to hear it bc rn I'm frustrated with this. It isn't "a pretty common solution", I can't find any video or other answered question on any forum that mentions doing anything like this for an image effect.
Just one example:
I made a script to make a unity camera render with chunky pixels (works in free)
I also have a pixelation setup like this in one of my old projects, so it does work. Also, I'm not sure if that point got across but this has nothing to do with Unity's Image Effect system. It's just a RenderTexture rescaled, that's all.
Another example:
Your answer
Follow this Question
Related Questions
Image Effect problem on mobile & optimization 0 Answers
How to get pixel coordinates in an image effect shader 2 Answers
Stereoscopic postscreen effect UV differences (multi pass) 0 Answers
Shaders: How do I make camera view transparent? (Image effect) 1 Answer
How to apply image effect on a specific area of the screen 2 Answers