浏览代码

LWRP - Work around texture array blit issue for screen-space shadow map

Our internal blit code does not want to bind all slices of a texture array if either the source of destination isn't a texture array.  If we use a NULL source, then the engine won't bind all slices.

Even though we don't need a source, I can bind the screenspace shadow map texture in order to satisfy the engine.  We need to fix the engine, or use another path in engine.

The screenspace shadow map generation still isn't quite working, but at least all slices are bound!
/lwrp-xr-sssm-DrawProc
Robert Srinivasiah 7 年前
当前提交
711ae2e0
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 7
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

7
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


{
cmd.GetTemporaryRT(m_ScreenSpaceShadowMapRTID, m_CurrCamera.pixelWidth, m_CurrCamera.pixelHeight, 0, FilterMode.Bilinear, RenderTextureFormat.R8);
}
cmd.Blit(null, m_ScreenSpaceShadowMapRT, m_ScreenSpaceShadowsMaterial);
// Note: The source isn't actually 'used', but there's an engine peculiarity (bug) that
// doesn't like null sources when trying to determine a stereo-ized blit. So for proper
// stereo functionality, we use the screen-space shadow map as the source (until we have
// a better solution).
cmd.Blit(m_ScreenSpaceShadowMapRT, m_ScreenSpaceShadowMapRT, m_ScreenSpaceShadowsMaterial);
if (LightweightUtils.HasFlag(frameRenderingConfiguration, FrameRenderingConfiguration.Stereo))
context.StartMultiEye(m_CurrCamera);

正在加载...
取消
保存