Skip to content

Commit

Permalink
Native Render Pass support: don't use memoryless depth attachments wh…
Browse files Browse the repository at this point in the history
…en rendering directly to swap chain buffer [closes #181]
  • Loading branch information
Delt06 committed Dec 19, 2023
1 parent c8876e7 commit 213cc35
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ private void BeginNativeRenderPass(ref ScriptableRenderContext context, CommandB
}

if (depthAttachment.loadAction == RenderBufferLoadAction.Load ||
depthAttachment.storeAction == RenderBufferStoreAction.Store)
depthAttachment.storeAction == RenderBufferStoreAction.Store ||
DepthBufferId == BuiltinRenderTextureType.CameraTarget
)
{
colorAttachment.loadStoreTarget = DepthBufferId;
depthAttachment.loadStoreTarget = BuiltinRenderTextureType.Depth;
}
}

Expand Down

0 comments on commit 213cc35

Please sign in to comment.