浏览代码

HDRenderPipeline: Move CPU light gathering ahead to prepare for shadowmask

/Yibing-Project-2
Sebastien Lagarde 7 年前
当前提交
555c387b
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 13
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

13
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


return;
}
// The first thing to do is to go through all lights on the CPU side and prepare light for GPU.
// This allow us to deal with the flexibility of shadow mask that will do a GBuffer allocation on demand (in case of deferred rendering)
m_LightLoop.PrepareLightsForGPU(m_ShadowSettings, m_CullResults, camera);
InitAndClearBuffer(hdCamera, cmd);
RenderDepthPrepass(m_CullResults, camera, renderContext, cmd);

}
}
m_LightLoop.PrepareLightsForGPU(m_ShadowSettings, m_CullResults, camera);
m_LightLoop.RenderShadows(renderContext, cmd, m_CullResults);
cmd.GetTemporaryRT(m_DeferredShadowBuffer, camera.pixelWidth, camera.pixelHeight, 0, FilterMode.Point, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear, 1 , true);

bool preRefractionQueue = false)
{
m_SinglePassName[0] = passName;
RenderTransparentRenderList(cull, camera, renderContext, cmd, m_SinglePassName,
RenderTransparentRenderList(cull, camera, renderContext, cmd, m_SinglePassName,
rendererConfiguration, stateBlock, overrideMaterial, preRefractionQueue);
}

var filterSettings = new FilterRenderersSettings(true)
{
renderQueueRange = preRefractionQueue
? k_RenderQueue_PreRefraction
renderQueueRange = preRefractionQueue
? k_RenderQueue_PreRefraction
: k_RenderQueue_Transparent
};

}
else
{
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, m_ForwardErrorPassNames, 0,
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, m_ForwardErrorPassNames, 0,
null, m_ErrorMaterial, pass == ForwardPass.PreRefraction);
}
}

正在加载...
取消
保存