How to turn off shadows in MaskPass?

一曲冷凌霜 提交于 2020-01-07 03:05:50

问题


I have a MaskPass that uses separate scene for a picked object. I'd like the object to be lit the same way as in the original scene, preferably without copying all the lights into the second scene and updating their positions as well.

In r65 it was default behavior of the WebGLRenderer and it seems it was considered a bug and removed. Any ideas how to reproduce the original behavior?

(It only occurs when shadowMap is enabled, which I need to have)


回答1:


Got it. MaskPass.render calls WebGLRenderer.render, which calls ShadowMap.render... so you just have to add a new parameter ('mask' for example) to the renderer call to omit the shadowmap rendering.



来源:https://stackoverflow.com/questions/34080681/how-to-turn-off-shadows-in-maskpass

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