During the rewrite, I want to improve the process of writing shaders so that I don’t need to write similar shaders multiple times for each shader permutation (say, for each surface, I have to write a shader for static mesh, skinned mesh, instanced static mesh… multiplies with the number of render pass), and instead I can focus on coding how the surface would looks like. So I decided to write a shader generator that will generate those shaders which is similar to the surface shader in Unity.
To be honest, I don't understand why would he have to write a different shader for a static mesh, a skineed mesh, and an instanced static mesh... can someone explain?..
As far as I know, if you want a shader to behave the same in whatever surface you are using it, you shouldn't need to write one different for different types of meshes, no matter what.
or how can they differ that would make any one write multiple similar shaders for each?
thanks






