How do I inject shader code into a standardMaterial?

I want to modify the shader code of the standard material, how can I change the built-in shader code before the material is compiled

You can use Material Plugin, here is the documentation

Material Plugins | Babylon.js Documentation (babylonjs.com)

3 Likes

There us CustomMaterial and a PBR CustomMaterial you can use to inject stuff.

1 Like