I understand that writing an image effect in unity involves shaders, however I don’t quite get to what extent shaders will be of help. To explain briefly I need to manipulate pixels based on the world objects distances to the camera. So I would be very grateful to anyone who could enlighten me on where to start, and help me drawing a clear line between parts that need to be written inside the shader and parts that are normal js or c# scripting.
Regards,
KOUROSH
You need to calculate world objects position from the camera depth texture and after a distance check you can do the manipulation you want.
I have samples of this technique in my shader pack
Thanks Aubergine for really quick reply. So is it a one by one calculation for each object?
No. It really is an Image effect. So you have the rendered image as a texture and the depth as an image and can generate effects based on that. There’s no separation into objects. You might want to take a look at how thew built-in stuff is done. Some of the effects are pretty simple (both the script and the shader).