浏览代码

Fixed a bug with depth buffer not being properly created when switching scenes.

/Branch_Batching2
Julien Ignace 7 年前
当前提交
455c2c85
共有 1 个文件被更改,包括 14 次插入12 次删除
  1. 26
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

26
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


if (m_LightLoop == null)
return;
if (camera.pixelWidth != m_CurrentWidth || camera.pixelHeight != m_CurrentHeight)
bool resolutionChanged = camera.pixelWidth != m_CurrentWidth || camera.pixelHeight != m_CurrentHeight;
if (resolutionChanged || m_CameraDepthStencilBuffer == null)
if(m_LightLoop.NeedResize())
{
if (m_CurrentWidth > 0 && m_CurrentHeight > 0)
{
m_LightLoop.ReleaseResolutionDependentBuffers();
}
}
m_LightLoop.AllocResolutionDependentBuffers(camera.pixelWidth, camera.pixelHeight);
if (resolutionChanged || m_LightLoop.NeedResize())
{
if (m_CurrentWidth > 0 && m_CurrentHeight > 0)
{
m_LightLoop.ReleaseResolutionDependentBuffers();
// update recorded window resolution
m_CurrentWidth = camera.pixelWidth;
m_CurrentHeight = camera.pixelHeight;
m_LightLoop.AllocResolutionDependentBuffers(camera.pixelWidth, camera.pixelHeight);
// update recorded window resolution
m_CurrentWidth = camera.pixelWidth;
m_CurrentHeight = camera.pixelHeight;
}
public void PushGlobalParams(HDCamera hdCamera, ScriptableRenderContext renderContext, SubsurfaceScatteringSettings sssParameters)

正在加载...
取消
保存