【发布时间】:2020-04-29 09:44:38
【问题描述】:
我需要制作灯光(太阳)来为所有场景投射阴影(DirectionalLight 是最好的,对吗?),但质量很差,所以我正在尝试设置阴影:开/关,低、正常、高:
a = 512 ... 8192; b = 300 ... 8000
light.castShadow = checked; - no update (but if reload an objects it is work)
light.shadow.mapSize.width/height = a; - this works
light.shadow.camera.top/bottom/left/right = b; - no updating
尝试查看更改,但没有任何效果:
light.shadow.camera.updateProjectionMatrix(); - shadows disappear at all
scene.updateMatrixWorld();
camera.updateProjectionMatrix();
camera.updateMatrixWorld();
camera.updateMatrix();
有没有更好的晒太阳的方法? 以及如何重绘阴影?
添加一个示例以更好地理解我的意思 -> Example
【问题讨论】:
标签: javascript three.js