为了让所有阴影都渲染出来,我将///设置为shadow.camera.top定向bottom光(投射阴影),但它导致阴影痤疮。我尝试使用但仍然不对。阴影痤疮的原因是什么以及如何解决?leftrightshadow.bias
这是我的代码。
light = new THREE.DirectionalLight( 0xffffff );
light.position.set( 38, 82, 1 );
light.castShadow = true;
// light.shadow.bias = -0.001;
light.shadow.mapSize.width = 2048;
light.shadow.mapSize.height = 2048;
light.shadow.camera.near = 0.1; // same as the camera
light.shadow.camera.far = 1000; // same as the camera
light.shadow.camera.top = 120;
light.shadow.camera.bottom = -120;
light.shadow.camera.left = 120;
light.shadow.camera.right = -120;
scene.add( light );
Run Code Online (Sandbox Code Playgroud)
谢谢!!