@@ -232,7 +232,7 @@ void InitLegacy()
232
232
m_Camera . AddCommandBuffer ( CameraEvent . BeforeLighting , m_LegacyCmdBufferBeforeLighting ) ;
233
233
m_Camera . AddCommandBuffer ( CameraEvent . BeforeImageEffectsOpaque , m_LegacyCmdBufferOpaque ) ;
234
234
m_Camera . AddCommandBuffer ( CameraEvent . BeforeImageEffects , m_LegacyCmdBuffer ) ;
235
-
235
+
236
236
// Internal context used if no SRP is set
237
237
m_CurrentContext = new PostProcessRenderContext ( ) ;
238
238
}
@@ -397,7 +397,11 @@ void OnPreCull()
397
397
// and use LoadAction.DontCare freely, which will ruin the RT if we are using viewport.
398
398
// It should actually check for having tiled architecture but this is not exposed to script,
399
399
// so we are checking for mobile as a good substitute
400
+ #if UNITY_2019_3_OR_NEWER
401
+ if ( SystemInfo . usesLoadStoreActions )
402
+ #else
400
403
if ( Application . isMobilePlatform )
404
+ #endif
401
405
{
402
406
Rect r = m_Camera . rect ;
403
407
if ( Mathf . Abs ( r . x ) > 1e-6f || Mathf . Abs ( r . y ) > 1e-6f || Mathf . Abs ( 1.0f - r . width ) > 1e-6f || Mathf . Abs ( 1.0f - r . height ) > 1e-6f )
@@ -450,7 +454,7 @@ static bool RequiresInitialBlit(Camera camera, PostProcessRenderContext context)
450
454
return true ;
451
455
if ( RuntimeUtilities . scriptableRenderPipelineActive ) // Should never be called from SRP
452
456
return true ;
453
-
457
+
454
458
return false ;
455
459
#else
456
460
return true ;
@@ -561,7 +565,7 @@ void BuildCommandBuffers()
561
565
cmd . BuiltinBlit ( context . source , context . destination , RuntimeUtilities . copyStdMaterial , stopNaNPropagation ? 1 : 0 ) ;
562
566
UpdateSrcDstForOpaqueOnly ( ref srcTarget , ref dstTarget , context , cameraTarget , opaqueOnlyEffects ) ;
563
567
}
564
-
568
+
565
569
if ( isScreenSpaceReflectionsActive )
566
570
{
567
571
ssrRenderer . Render ( context ) ;
@@ -581,7 +585,7 @@ void BuildCommandBuffers()
581
585
582
586
cmd . ReleaseTemporaryRT ( srcTarget ) ;
583
587
}
584
-
588
+
585
589
// Post-transparency stack
586
590
int tempRt = - 1 ;
587
591
bool forceNanKillPass = ( ! m_NaNKilled && stopNaNPropagation && RuntimeUtilities . isFloatingPointFormat ( sourceFormat ) ) ;
@@ -614,7 +618,7 @@ void BuildCommandBuffers()
614
618
context . flip = true ;
615
619
context . destination = Display . main . colorBuffer ;
616
620
}
617
- }
621
+ }
618
622
#endif
619
623
620
624
context . command = m_LegacyCmdBuffer ;
@@ -635,9 +639,9 @@ void OnPostRender()
635
639
{
636
640
#if UNITY_2018_2_OR_NEWER
637
641
// TAA calls SetProjectionMatrix so if the camera projection mode was physical, it gets set to explicit. So we set it back to physical.
638
- if ( m_CurrentContext . physicalCamera )
642
+ if ( m_CurrentContext . physicalCamera )
639
643
m_Camera . usePhysicalProperties = true ;
640
- else
644
+ else
641
645
#endif
642
646
m_Camera . ResetProjectionMatrix ( ) ;
643
647
0 commit comments