So I’ve looked into full-screen image effects where you use the “Blit” function to copy your rendered scene from one texture to another, passing it through a shader that applies the desired post-process effect.
What I’m looking to do is render a world-space post-process effect so I can distort the pixels and make a rippling effect. I can handle most of this task, but I need to be able to render an object after the rest of the scene has been rendered, and I need access to the rendered scene texture to sample from.
Does anyone know how this is done?
Unity ShaderLab provides GrabPass instruction to capture current frame buffer
For convenience, you can add a GrabPass in your distort shader. It can be costly though if you have multiple object using this shader. the GrabPass will run on every object with this material rendered but you actually onlly need to grab screen once.
here’s my solution create a shader simply doing the GrabPass at Queue > [distort shader render queue], whenever you have a distort render object in your scene, you active a empty renderer using the GrabPass shader in front of the camera.
1 Like