浏览代码

Fix forward rendering

/RenderPassXR_Sandbox
Evgenii Golubev 7 年前
当前提交
ac41fbe7
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 9
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs

9
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs


public void RenderForward(Camera camera, CommandBuffer cmd, bool renderOpaque)
{
// Note: if we use render opaque with deferred tiling we need to render a opaque depth pass for these opaque objects
bool useFptl = renderOpaque && usingFptl;
PushGlobalParams(camera, cmd, null, 0);
// Note: if we use render opaque with deferred tiling we need to render a opaque depth pass for these opaque objects
if (!m_TileSettings.enableTileAndCluster)
{
using (new Utilities.ProfilingSample("Forward pass", cmd))

}
else
{
using (new Utilities.ProfilingSample(useFptl ? "Forward Tiled pass" : "Forward Clustered pass", cmd))
using (new Utilities.ProfilingSample(usingFptl ? "Forward Tiled pass" : "Forward Clustered pass", cmd))
cmd.SetGlobalFloat("_UseTileLightList", useFptl ? 1 : 0); // leaving this as a dynamic toggle for now for forward opaques to keep shader variants down.
cmd.SetGlobalBuffer("g_vLightListGlobal", useFptl ? s_LightList : s_PerVoxelLightLists);
cmd.SetGlobalFloat("_UseTileLightList", usingFptl ? 1 : 0); // leaving this as a dynamic toggle for now for forward opaques to keep shader variants down.
}
}
}

正在加载...
取消
保存