three.js shadowCascade DirectionalLight

旧巷老猫 提交于 2019-12-25 11:55:03

问题


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:


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



来源:https://stackoverflow.com/questions/22409336/three-js-shadowcascade-directionallight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!