I got shadows working on an extended Lambert shader no problem.
I extended the phong shader and it is not working for me.
I’m assuming because the THREE.ShaderLib[‘lambert’] has the following:
reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();
The Phong fragment shader has no such code in it.
Do i need to patch in the shadow shader code from lambert? That doesn’t really make sense. Why would Lambert shader work with shadows “out of the box” and not phong?
What am I missing here?