- Home /
When should u use (graph)shader over animations?
I have learned recently that (graph)shaders can also be used to make an object move or "animate" the transparency, colour etc. of it, to give it some cool effects. However I can also go to Window -> Animation and press record to animate the colour, movement etc. of an object. So I guess u should use them depending on what situation ur in. Therefore I need to know in what situation u should choose one over the other. And therefore I need to understand how they work, or where the difference is between them. So if someone could explain me that then I would really appreciate that. (I have in my situation a forest with grass and a campfire that only needs to be moved. I'am targeting mobile devices so I value performance over control/looks.)
Answer by aoun111 · Jul 04, 2019 at 09:02 PM
Shader graph is used for creating much complex materials, like holograms, lava, portal surface etc. It has a Time node to animate those changes. Animations of Unity are used in moving, rotating or coloring gameobjects with simplicity.
Thank you for ur reply. I would like to know how a shader is executed/rendered and what the things are in a shader that will really decrease performance. @aoun111
A shader is rendered on the GPU which is designed to handle these kinds of processes, to boost performance and keeping the quality satisfactory. In a shader, only calculating position of vertices and triangles and using tesselation will decrease performance, but it is not such a big issue unless you use the shader on complex models with many vertices and triangles.
Alsoz some shaders are also rendered using CPU, but this doesnt affect perofrmance that much. So you can use animations in simple cases but shaders in more complex ones.
Your answer
![](https://koobas.hobune.stream/wayback/20220612204344im_/https://answers.unity.com/themes/thub/images/avi.jpg)