浏览代码

Merge pull request #1385 from Unity-Technologies/Fix-issue-with-OnWillRenderObject-in-HDRP

Fix issue with OnWillRenderObject in HDRP
/main
GitHub 7 年前
当前提交
95e8ecb9
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


RTHandleSystem.RTHandle m_DebugFullScreenTempBuffer;
bool m_FullScreenDebugPushed;
bool m_ValidAPI; // False by default mean we render normally, true mean we don't render anything
bool m_IsCameraRendering; // Use to avoid nested rendering of camera
public Material GetBlitMaterial() { return m_Blit; }

DebugManager.instance.RefreshEditor();
m_ValidAPI = true;
m_IsCameraRendering = false;
if (!SetRenderingFeatures())
{

if (!m_ValidAPI)
return;
if (m_IsCameraRendering)
{
Debug.LogWarning("Nested camera rendering is forbidden. If you are calling camera.Render inside OnWillRenderObject callback, use BeginCameraRender callback instead.");
return;
}
base.Render(renderContext, cameras);
RenderPipeline.BeginFrameRendering(cameras);

continue;
RenderPipeline.BeginCameraRendering(camera);
m_IsCameraRendering = true;
// First, get aggregate of frame settings base on global settings, camera frame settings and debug settings
// Note: the SceneView camera will never have additionalCameraData

m_DebugScreenSpaceTracingDataArray[0] = data;
m_DebugScreenSpaceTracingData.SetData(m_DebugScreenSpaceTracingDataArray);
}
m_IsCameraRendering = false;
} // For each camera
}

正在加载...
取消
保存