小编Tif*_*any的帖子

Three.js 阴影痤疮的原因是什么以及如何解决

为了让所有阴影都渲染出来,我将///设置为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)

谢谢!!

javascript model three.js

6
推荐指数
1
解决办法
3807
查看次数

标签 统计

javascript ×1

model ×1

three.js ×1