Where is the shader implementation of MeshStandardMaterial?

I can find meshtoon.glsl.js meshbasic.glsl.js meshphone.glsl.js etc… but where is the one for MeshStandardMaterial? do some materials not have their own shader implementation? how are they implemented?
Thank you!

It’s in meshphysical.glsl, MeshStandardMaterial and MeshPhysicalMaterial use the same base shader code but with different features disabled to make MeshStandardMaterial a little cheaper.

4 Likes

If you need a general spot to browse the source of the built in materials/shaders, this site is excellent:

https://ycw.github.io/three-shaderlib-skim/dist/#/latest/standard/fragment

2 Likes

Albeit somewhat old, this article covered a lot about shaders in threejs when it used templates:

2 Likes