camera4SM = new THREE.PerspectiveCamera(45, width / height, 10, 1000)//new THREE.OrthographicCamera(-100, 100, 100, -100, 1, 170);
camera4SM.position.set(40, 40, 40);
camera4SM.lookAt(bufferScene.position);
camera4SM.aspect = width / height;
float visibility = (shadowCoord.z > depth + 0.005) ? 0.0 : 1.0;
这样就有效果了.