浏览代码

Bind correctly the buffer in forward

/main
sebastienlagarde 7 年前
当前提交
fa7475f2
共有 1 个文件被更改,包括 16 次插入6 次删除
  1. 22
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

22
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


if (pass == ForwardPass.Opaque)
{
// TODO: return this from the SSS manager with variable MRT + if SSS is enabled
RenderTargetIdentifier[] m_MRTCache3 = new RenderTargetIdentifier[3];
m_MRTCache3[0] = m_CameraColorBufferRT;
m_MRTCache3[1] = m_CameraSssDiffuseLightingBufferRT;
m_MRTCache3[2] = m_GbufferManager.GetGBuffers()[0];
// In case of forward SSS we will bind all the required target. It is up to the shader to write into it or not.
if (m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission)
{
RenderTargetIdentifier[] m_MRTWithSSS = new RenderTargetIdentifier[2 + m_SSSBufferManager.sssBufferCount];
m_MRTWithSSS[0] = m_CameraColorBufferRT; // Store the specular color
m_MRTWithSSS[1] = m_CameraSssDiffuseLightingBufferRT;
for (int i = 0; i < m_SSSBufferManager.sssBufferCount; ++i)
{
m_MRTWithSSS[i + 2] = m_SSSBufferManager.GetSSSBuffers(i);
}
CoreUtils.SetRenderTarget(cmd, m_MRTCache3, m_CameraDepthStencilBufferRT);
CoreUtils.SetRenderTarget(cmd, m_MRTWithSSS, m_CameraDepthStencilBufferRT);
}
else
{
CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT);
}
if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled())
{

正在加载...
取消
保存