THREE.JS Shadow on opposite side of light

后端 未结 1 1014
耶瑟儿~
耶瑟儿~ 2020-12-17 22:15

I used THREE.js r49 create 2 cube geometry with a directional light to cast shadow on them and got result as in the following picture.

I noticed that the shadow in t

相关标签:
1条回答
  • 2020-12-17 23:02

    Yes, this is a known, and long-standing, WebGLRenderer issue.

    The problem is that the dot product of the face normal and the light direction is not taken into consideration in the shadow calculation. As a consequence, "shadows show through from the back".

    As a work-around, you could have a different material for each face, with only certain materials receiving shadows.

    three.js r.71

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