浏览代码

Bugfix PreIntegratedFGD is now initialized even if there is no active camera on init.

/Branch_batcher
runes 7 年前
当前提交
506f89be
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 16
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

16
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


private void CopyDepthBufferIfNeeded(ScriptableRenderContext renderContext)
{
var cmd = new CommandBuffer() { name = NeedDepthBufferCopy() ? "Copy DepthBuffer" : "Set DepthBuffer"};
if (NeedDepthBufferCopy())
{
using (new Utilities.ProfilingSample("Copy depth-stencil buffer", renderContext))

// select the most main camera!
Camera camera = cameras.OrderByDescending(x => x.tag == "MainCamera").FirstOrDefault();
if (camera == null)
return;
if (camera == null)
{
renderContext.Submit();
return;
}
if (!CullResults.GetCullingParameters(camera, out cullingParams))
return;
if (!CullResults.GetCullingParameters(camera, out cullingParams))
{
renderContext.Submit();
return;
}
m_ShadowPass.UpdateCullingParameters(ref cullingParams);

正在加载...
取消
保存