I\'m building a small representation of my house in ThreeJS, and I have the walls and such sorted and am in the process of adding the lights. I\'m using PointLights as they are
You are having problems with shadows when you have multiple light sources and the material receiving the shadow is MeshLambertMaterial
.
This is a limitation of MeshLambertMaterial
due to the fact that it uses Gouraud shading -- the illumination calculation is computed in the vertex shader. Since shadows are computed in the fragment shader, there is no way to identify the light sources at that point.
For proper shadows, use MeshPhongMaterial
or MeshStandardMaterial
, for example.
three.js r.88