THREE.js中的阴影有问题

时间:2015-06-15 11:42:55

标签: javascript 3d three.js

enter image description here enter image description here 如何将阴影改为正常?

聚光灯和渲染器的来源:

        spotLight = new THREE.SpotLight(0xffffff);
        spotLight.position.set(0, room.height, 0);
        spotLight.castShadow = true;
        spotLight.shadowMapWidth = 8192; // default is 512
        spotLight.shadowMapHeight = 8192; // default is 512
        scene.add(spotLight);

        renderer.shadowMapEnabled = true;
        renderer.shadowMapSoft = true;
        renderer.shadowMapType = THREE.PCFSoftShadowMap;
        renderer.shadowCameraNear = 0.1;
        renderer.shadowCameraFar = camera.far;
        renderer.shadowCameraFov = 45;
        renderer.shadowMapBias = 1;
        renderer.shadowMapDarkness = 0.5;
        renderer.shadowMapWidth = 8192;
        renderer.shadowMapHeight = 8192;
        renderer.sortObjects = false

对象正在投射并接收阴影。

0 个答案:

没有答案