An easy way to create camera effects is to put an object with a fun shader in front of the camera. (There will need to be some transparency in the shader)
But why stop there? Why not make the effect even more interesting by controlling the material during runtime and perhaps animating some properties?
So let's see about how to that as it's very simple.
But why stop there? Why not make the effect even more interesting by controlling the material during runtime and perhaps animating some properties?
So let's see about how to that as it's very simple.
Get a reference to your material, however you see fit.
Now to figure out the properties...
Many people know the common properties:
Diffuse - "_MainTex"
Specular/Roughness - "_SpecGlossMap"
Normal - "_BumpMap"
AO - "_Occlusion"
But what about the rest? What if is a custom shader that doesn't use the default properties? The answer is easy. Simply right click on the material and choose Select Shader.
Now to figure out the properties...
Many people know the common properties:
Diffuse - "_MainTex"
Specular/Roughness - "_SpecGlossMap"
Normal - "_BumpMap"
AO - "_Occlusion"
But what about the rest? What if is a custom shader that doesn't use the default properties? The answer is easy. Simply right click on the material and choose Select Shader.
You should then notice the inspector changes and more info is presented for the shader. What we care about are the properties...
Now that we can see what the real names of the properties are, we can call them easily.
You can use that to create some cool effects ;)