如何关闭 MaskPass 中的阴影?

编程入门 行业动态 更新时间:2024-10-25 07:17:39
本文介绍了如何关闭 MaskPass 中的阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 14:51:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1395708.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阴影   MaskPass

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!