Purpose of shaders?
Hello everyone, I know that there is shaders scripting language that has something to do with graphics, but I never understood almost anything about shaders. How much and what difference can be made with shaders, what do shaders change and do what can be improved with them? My question is: What can be done with shaders that can't be done with simple materials that have certain values for metallic and smoothness or image effects?? Thanks in advance.
Shaders weren't invented by Unity. Just google "shaders computer graphics" and read. It may take a while.
Answer by KristofferH · Jun 03, 2016 at 11:56 AM
A shader is the underlying code of the materials. So from your point of you shaders and material are practically the same thing.
A shader is a piece of code a programmer has written. A material is what an artist creates by setting different values for that shader.
But I don't understand for what purpose one might need to program his own shader ins$$anonymous$$d of using material and modifying the values?
When the shaders that comes with Unity isn't enough to create the material/effect that you want, then you have to write your own shader, or get someone else to do it, or download one.
Few examples: Cartoon shaders that create outlines / contours around 3D models.
The car paints in rocket league or many other car games. I don't think you can create as nice of a glitter effect and definitely not a proper 'chameleon paint' with unity's default shaders.
The grass in Rocket League (Shaders are run on your GPU which can perform certain kind of tasks multiple times faster than your CPU which makes it possible to make particle systems with thousands of particles whereas creating (in Unity) thousands of GameObjects, like grass, would destroy performance)
Answer by Zodiarc · Jun 03, 2016 at 02:15 PM
A shader tells the engine how to render a certain material. That's basically it.