如何关闭 MaskPass 中的阴影? [英] How to turn off shadows in MaskPass?

查看:20
本文介绍了如何关闭 MaskPass 中的阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 MaskPass,它为选取的对象使用单独的场景.我希望以与原始场景中相同的方式照亮对象,最好不要将所有灯光复制到第二个场景中并更新它们的位置.

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.

在 r65 中,这是 WebGLRenderer 的默认行为,它似乎被认为是一个错误并已删除.任何想法如何重现原始行为?

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?

(仅在启用 shadowMap 时发生,这是我需要的)

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

推荐答案

明白了.MaskPass.render 调用WebGLRenderer.render,后者调用ShadowMap.render...所以你只需要在渲染器调用中添加一个新参数(例如'mask')以省略阴影贴图渲染.

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.

这篇关于如何关闭 MaskPass 中的阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆