未烘焙灯光时,Unity 5.6 在何处渲染到 ShadowMask

Where does Unity 5.6 Render into the ShadowMask when lights aren't baked

我目前正在尝试使用 CommandBuffers 为我的几何体渲染灯光和阴影,使用 CommandBuffer.DrawProcedural 它有效,但只有当渲染的对象与这个新的 ShadowMask 重叠时。

Here is you can see the masking effect

And this is the Shadowmask Buffer

所以我想我的问题是 unity 是否有办法使用 CommandBuffer 渲染到该遮罩中,或者我只是在我的游戏世界周围扔一个网格立方体?

将此模板蒙版添加到我的延迟通道中后,在使用带有 drawprocedural 和 commandbuffers 的光影时可以正确渲染灯光

Stencil{
            ref[_StencilNonBackground]
            Comp Always
            Pass Replace

            ZFail Keep
            Fail Keep
        }