Hello, I need to write custom post-processing shaders for Unity. I'm looking to do this using vertex and fragment shaders in CG and applying the effect over a camera's view. Once I've written a shader file, how do I actually put it to use? Most components in Unity you can simply drag and drop where ever you'd like, but I can't seem to do anything with shader files.
While looking for an answer, I've noticed in some of the imageEffects scripts that Unity has built-in that they use a shader on a material, but I'm looking to apply the shader to a camera's view, not on an object's material. Many of Unity's built-in shaders don't have a matching script, so they must be getting applied in some other manner but I haven't figured out how. The only thing I've been able to find in the documentation is applying the shader to an object's material. I'm sure there's something simple that I'm just not seeing. Does anyone have any experience with shaders in Unity that could help me out? Thank you.
↧