Overlapping PointLight Shadows using MeshLambertMaterial

前端 未结 1 737
情话喂你
情话喂你 2021-01-25 13:35

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

相关标签:
1条回答
  • 2021-01-25 14:16

    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

    0 讨论(0)
提交回复
热议问题