@@ -350,7 +350,7 @@ internal static void SetGlobalShaderSourceSize(CommandBuffer cmd, RTHandle sourc
350350 SetGlobalShaderSourceSize ( CommandBufferHelpers . GetRasterCommandBuffer ( cmd ) , source ) ;
351351 }
352352
353- internal static void ScaleViewport ( RasterCommandBuffer cmd , RTHandle dest , UniversalCameraData cameraData , bool isFinalPass )
353+ internal static void ScaleViewport ( RasterCommandBuffer cmd , RTHandle dest , UniversalCameraData cameraData , bool isActiveTargetBackBuffer )
354354 {
355355 RenderTargetIdentifier cameraTarget = BuiltinRenderTextureType . CameraTarget ;
356356#if ENABLE_VR && ENABLE_XR_MODULE
@@ -359,7 +359,7 @@ internal static void ScaleViewport(RasterCommandBuffer cmd, RTHandle dest, Unive
359359#endif
360360 if ( dest . nameID == cameraTarget || cameraData . targetTexture != null )
361361 {
362- if ( ! isFinalPass || ! cameraData . resolveFinalTarget )
362+ if ( ! isActiveTargetBackBuffer )
363363 {
364364 // Inside the camera stack the target is the shared intermediate target, which can be scaled with render scale.
365365 // camera.pixelRect is the viewport of the final target in pixels, so it cannot be used for the intermediate target.
@@ -383,19 +383,19 @@ internal static void ScaleViewport(RasterCommandBuffer cmd, RTHandle dest, Unive
383383 }
384384 }
385385
386- internal static void ScaleViewportAndBlit ( RasterGraphContext context , in TextureHandle sourceTexture , in TextureHandle destTexture , UniversalCameraData cameraData , Material material , bool isFinalPass )
386+ internal static void ScaleViewportAndBlit ( RasterGraphContext context , in TextureHandle sourceTexture , in TextureHandle destTexture , UniversalCameraData cameraData , Material material , bool isActiveTargetBackBuffer )
387387 {
388388 Vector4 scaleBias = RenderingUtils . GetFinalBlitScaleBias ( context , sourceTexture , destTexture ) ;
389- ScaleViewport ( context . cmd , destTexture , cameraData , isFinalPass ) ;
389+ ScaleViewport ( context . cmd , destTexture , cameraData , isActiveTargetBackBuffer ) ;
390390
391391 Blitter . BlitTexture ( context . cmd , sourceTexture , scaleBias , material , 0 ) ;
392392 }
393393
394- internal static void ScaleViewportAndDrawVisibilityMesh ( RasterGraphContext context , in TextureHandle sourceTexture , in TextureHandle destTexture , UniversalCameraData cameraData , Material material , bool isFinalPass )
394+ internal static void ScaleViewportAndDrawVisibilityMesh ( RasterGraphContext context , in TextureHandle sourceTexture , in TextureHandle destTexture , UniversalCameraData cameraData , Material material , bool isActiveTargetBackBuffer )
395395 {
396396#if ENABLE_VR && ENABLE_XR_MODULE
397397 Vector4 scaleBias = RenderingUtils . GetFinalBlitScaleBias ( context , sourceTexture , destTexture ) ;
398- ScaleViewport ( context . cmd , destTexture , cameraData , isFinalPass ) ;
398+ ScaleViewport ( context . cmd , destTexture , cameraData , isActiveTargetBackBuffer ) ;
399399
400400 // Set property block for blit shader
401401 MaterialPropertyBlock xrPropertyBlock = XRSystemUniversal . GetMaterialPropertyBlock ( ) ;
0 commit comments