Skip to content

Commit

Permalink
[Port] [2023.2] UUM-61466 Set depth format for cameras with motion ve…
Browse files Browse the repository at this point in the history
…ctors

JIRA: UUM-61466

When motion vectors are required and a depth-less offscreen texture is used as the camera target, a default depth format should be provided to motion vectors.
  • Loading branch information
svc-reach-platform-support authored and Evergreen committed Feb 22, 2024
1 parent 85c4594 commit ace41b8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,10 @@ void CreateCameraRenderTarget(ScriptableRenderContext context, ref RenderTexture
depthDescriptor.depthStencilFormat = k_DepthStencilFormat;
RenderingUtils.ReAllocateIfNeeded(ref m_CameraDepthAttachment, depthDescriptor, FilterMode.Point, TextureWrapMode.Clamp, name: "_CameraDepthAttachment");
cmd.SetGlobalTexture(m_CameraDepthAttachment.name, m_CameraDepthAttachment.nameID);

// update the descriptor to match the depth attachment
descriptor.depthStencilFormat = depthDescriptor.depthStencilFormat;
descriptor.depthBufferBits = depthDescriptor.depthBufferBits;
}
}

Expand Down

0 comments on commit ace41b8

Please sign in to comment.