Skip to content

Commit ef86567

Browse files
Fix issue with the resolve of motion vectors (#421)
1 parent 3f84559 commit ef86567

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.render-pipelines.high-definition/Runtime/Material/SharedRTManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public void ResolveMotionVectorTexture(CommandBuffer cmd, HDCamera hdCamera)
382382
{
383383
using (new ProfilingScope(cmd, ProfilingSampler.Get(HDProfileId.ResolveMSAAMotionVector)))
384384
{
385-
CoreUtils.SetRenderTarget(cmd, m_MotionVectorsRT, m_CameraDepthStencilBuffer);
385+
CoreUtils.SetRenderTarget(cmd, m_MotionVectorsRT);
386386
Shader.SetGlobalTexture(HDShaderIDs._MotionVectorTextureMS, m_MotionVectorsMSAART);
387387
cmd.DrawProcedural(Matrix4x4.identity, m_MotionVectorResolve, SampleCountToPassIndex(m_MSAASamples), MeshTopology.Triangles, 3, 1);
388388
}

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,6 +2515,7 @@ void Callback(CommandBuffer c, HDCamera cam)
25152515
if (hdCamera.frameSettings.IsEnabled(FrameSettingsField.TransparentsWriteMotionVector))
25162516
{
25172517
m_SharedRTManager.ResolveMotionVectorTexture(cmd, hdCamera);
2518+
cmd.SetGlobalTexture(HDShaderIDs._CameraMotionVectorsTexture, m_SharedRTManager.GetMotionVectorsBuffer());
25182519
}
25192520

25202521
// We push the motion vector debug texture here as transparent object can overwrite the motion vector texture content.

0 commit comments

Comments
 (0)