three.js shadowCascade DirectionalLight [英] three.js shadowCascade DirectionalLight
问题描述
我正在尝试从 http://threejs.org/examples/webgl_morphtargets_md2_control复制shadowCascade功能. html 到我的项目.我以1:1的比例进行操作,但是在一定角度和旋转角度下我只会得到一点点阴影,并且经常被遮挡掉.此外,从开始启用shadowCascade会引发着色器错误.我必须等待一段时间才能设置shadowCascade = true.
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.
我试图找到文档,链接或提示来说明shadowCascade的工作方式以及所有这些参数的作用,但到目前为止没有成功.
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!
推荐答案
shadowCascade
代码在一年多以来一直不是开发的重点.可能有问题.如果您想继续进行下去,并找出可能的错误,那将是很棒的.但是,某些问题可能是由于您的设备和/或浏览器引起的.
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.
现在,我建议您使用带有target
字符的定向光和一个紧密的阴影框.
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
three.js r.66
这篇关于three.js shadowCascade DirectionalLight的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!