Skip to content

Commit c3039e4

Browse files
gmitrano-unityEvergreen
authored andcommitted
Add Missing Dynamic Scaling Texture Flags
This change updates the render graph texture helper functions in URP to include logic for setting dynamic scaling properties. If these properties are omitted, we can end up with incorrectly scaled renders when hardware dynamic scaling is used.
1 parent 127fa66 commit c3039e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Packages/com.unity.render-pipelines.universal/Runtime/UniversalRendererRenderGraph.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ public static TextureHandle CreateRenderGraphTexture(RenderGraph renderGraph, Re
246246
rgDesc.wrapMode = wrapMode;
247247
rgDesc.isShadowMap = desc.shadowSamplingMode != ShadowSamplingMode.None && desc.depthStencilFormat != GraphicsFormat.None;
248248
rgDesc.vrUsage = desc.vrUsage;
249+
rgDesc.useDynamicScale = desc.useDynamicScale;
250+
rgDesc.useDynamicScaleExplicit = desc.useDynamicScaleExplicit;
249251
// TODO RENDERGRAPH: depthStencilFormat handling?
250252

251253
return renderGraph.CreateTexture(rgDesc);
@@ -267,6 +269,8 @@ internal static TextureHandle CreateRenderGraphTexture(RenderGraph renderGraph,
267269
rgDesc.enableRandomWrite = desc.enableRandomWrite;
268270
rgDesc.filterMode = filterMode;
269271
rgDesc.wrapMode = wrapMode;
272+
rgDesc.useDynamicScale = desc.useDynamicScale;
273+
rgDesc.useDynamicScaleExplicit = desc.useDynamicScaleExplicit;
270274

271275
return renderGraph.CreateTexture(rgDesc);
272276
}

0 commit comments

Comments
 (0)