简体   繁体   English

Threejs阴影无法渲染

[英]Threejs Shadows not rendering

So I have looked over all the other shadow issues on here, and none of them seemed relevant to mine, or I just overlooked it about 10 times. 因此,我查看了这里的所有其他影子问题,但这些问题似乎都与我无关,或者我只是忽略了十次。

https://gist.github.com/Sinistralis/58249d2f9aefa8f08a7d https://gist.github.com/Sinistralis/58249d2f9aefa8f08a7d

I would make a fiddle for this, but the version they host seems incompatible with either my code or the current version of chrome. 我会为此摆弄一个小提琴,但是它们托管的版本似乎与我的代码或chrome的当前版本都不兼容。 I could not get it to work even after changing .merge and BoxGeometry back to GeometryUtils and CudeGeometry respectively. 即使将.merge和BoxGeometry分别更改回GeometryUtils和CudeGeometry后,我也无法正常工作。

Basically, I am getting 0 shadows using threejs v .71 基本上,我使用threejs v .71得到0个阴影

I have all the cast booleans set, the scene is within my shadowmap, and I am using a correct light type. 我已经设置了所有的转换布尔值,场景在我的阴影贴图内,并且我使用的是正确的光源类型。 Why am I not getting shadows? 为什么我没有阴影?

This is not going to be very helpful to other users, unfortunately... 不幸的是,这对其他用户不会有太大帮助。

The proper spelling is receive . 正确的拼写是receive

floor.receiveShadow = true;
city.receiveShadow = true;

Also, have a look at this post about self-shadowing artifacts. 另外,请参阅有关自遮盖工件的这篇文章

three.js r.71 three.js r.71

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM