ShaderMaterial
materials are materials you write from scratch, so they don’t inherit anything from other materials.
However, it’s very easy to support bones and instances, see this example (from the How to use RenderTargetTexture and run multiple passes doc):
https://www.babylonjs-playground.com/#S1W87B#5
You simply need to add some includes in your shader to support bones / instances. However, ShaderMaterial
materials don’t support lights, see #include directives in shader code output from Node Material Editor
CustomMaterial
and PBRCustomMaterial
do support everything as they are really StandardMaterial
and PBRMaterial
in which you can inject code at some specific locations.