浏览代码

Merge pull request #1420 from Unity-Technologies/Solve-issue-with-motion-blur

HDRP: Solve issue with motion blur - Move object velocity render befo…
/main
GitHub 7 年前
当前提交
616d9f8c
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs

6
com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs


bool forcePrepassForDecals = m_DbufferManager.vsibleDecalCount > 0;
RenderDepthPrepass(m_CullResults, hdCamera, renderContext, cmd, forcePrepassForDecals);
RenderObjectsVelocity(m_CullResults, hdCamera, renderContext, cmd);
// This will bind the depth buffer if needed for DBuffer)
RenderDBuffer(hdCamera, cmd);

CopyDepthBufferIfNeeded(cmd);
RenderDepthPyramid(hdCamera, cmd, renderContext, FullScreenDebugMode.DepthPyramid);
// TODO: In the future we will render object velocity at the same time as depth prepass (we need C++ modification for this)
// Once the C++ change is here we will first render all object without motion vector then motion vector object
// We can't currently render object velocity after depth prepass because if there is no depth prepass we can have motion vector write that should have been rejected
RenderObjectsVelocity(m_CullResults, hdCamera, renderContext, cmd);
RenderCameraVelocity(m_CullResults, hdCamera, renderContext, cmd);
// Depth texture is now ready, bind it (Depth buffer could have been bind before if DBuffer is enable)

正在加载...
取消
保存