简体   繁体   中英

Three.js - Mesh don't receive more than 3 lights

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 ?

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM