Hi,
i’ve got a very simple question: Is there any way, i can declare a buffer (i.e. texture, array, whatsoever) in a shader, in order to use it in later passes? Got some pretty cool ideas in mind. But eventually i found out, i couldn’t do these in 1pass and not even whithout a buffer. So if anyone has any ideas, that would be great.
Greetz, the chickenlord
Passes with intermediate buffers are usually handled with scripts, and separate shaders applied manually. Check out some of the image effects scripts in the asset packages included with Unity.
Mhh, this is solution i thought of as well, but its not an option as it would be way too slow using it on multiple objects in a scene. Although it might be cool to do some “this is possible” effects.
Anyways, thanks for the quick answer.
Most effects use buffers for the whole screen at once, so you don’t need new buffers for each object.
Another way to handle buffers is to do it through RenderTextures (Unity Pro only)