three.js shadowCascade DirectionalLight

2019-08-28 05:10发布

I'm trying to copy the shadowCascade functionality from http://threejs.org/examples/webgl_morphtargets_md2_control.html to my project. I did this 1:1 however I only get a a little bit of shadowing at a certain angles and rotations, and often cut off. Further, enabling shadowCascade from start throws shader errors. I have to wait for some time until I can set shadowCascade = true.

I tried to find documentation, links or hints explaining how shadowCascade works and what all those parameters do, without success so far.

All in all I'm rather confused, I don't really understand what is happening and why. Thanks in advance for some clarification and help!

Here's a screenshot

Edit: Here's a video of the effect

1条回答
▲ chillily
2楼-- · 2019-08-28 06:04

The shadowCascade code has not been a significant focus of development in more than a year. There may be problems. If you want to pursue this, and track down possible bugs, that would be great. Some issues may be due to your device and/or browser, however.

For now, I would suggest you use a directional light with the character as the target and a tight shadow box.

three.js r.66

查看更多
登录 后发表回答