Question

I have a problem about lighting with three.js

In my scene, I have a mesh named A (with a MeshLambertMaterial) which receive 3 lights correctly : one DirectionalLight and two PointLight. However, the mesh A don't receive anymore PointLight while the PointLights are correctly setup. Indeed other meshes receive the light from the other PointLights.

I have searched property in renderer or materials but I haven't found anything to resolve my problem.

Why the mesh A don't receive anymore lights ?

Was it helpful?

Solution

After a lot of investigation, I've found the problem.

Each time I add a light, I need to put the material needsUpdate flag to true :

material.needsUpdate = true;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top