Skip to content

Commit b37bcc8

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.4] Graphics/URP/UUM-134993 - Fix URP Sample - Blit Depth Copy Pass wrongly binding msaa depth with Vulkan
1 parent c60a49c commit b37bcc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Packages/com.unity.render-pipelines.universal/Samples~/URPPackageSamples/RendererFeatures/DepthBlit/DepthBlitCopyDepthPass.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ public override void RecordRenderGraph(RenderGraph renderGraph, ContextContainer
8888
builder.SetRenderFunc((PassData data, RasterGraphContext context) =>
8989
{
9090
// Enable an MSAA shader keyword based on the source texture MSAA sample count
91+
// when depth must be resolved manually in the copy shader
9192
RTHandle sourceTex = data.source;
92-
int cameraSamples = sourceTex.rt.antiAliasing;
93+
int cameraSamples = sourceTex.rt.bindTextureMS ? sourceTex.rt.antiAliasing : 1;
9394
context.cmd.SetKeyword(data.keyword_DepthMsaa2, cameraSamples == 2);
9495
context.cmd.SetKeyword(data.keyword_DepthMsaa4, cameraSamples == 4);
9596
context.cmd.SetKeyword(data.keyword_DepthMsaa8, cameraSamples == 8);

0 commit comments

Comments
 (0)