【发布时间】:2018-08-11 16:30:07
【问题描述】:
我试图使用简单的定向光和阴影材质来创建阴影,问题是阴影似乎可以正常工作,在一个盒子里,当模型超出该区域时它就消失了???
image of the shadow at the bounds
代码如下:
var light = new THREE.DirectionalLight(0xffffff, 0);
renderer.shadowMap.enabled = true;
light.position.x = 100;
light.position.y = 150;
light.position.z = 0;
light.castShadow = true;
scene.add(light);
plane.receiveShadow = true;
plane.material = new THREE.ShadowMaterial({color: 0, opacity:1});
【问题讨论】:
-
当然我做了,在发布问题之前,如果你阅读了我的代码,你可以看到我使用的是 shadowMaterial 而不是standardMaterial