Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 76c0a8f

Browse files
committed
Fixed moving projects from SRP to vanilla breaking postfx
1 parent a110177 commit 76c0a8f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

PostProcessing/Runtime/PostProcessLayer.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ void OnEnable()
118118
m_TargetPool = new TargetPool();
119119

120120
debugLayer.OnEnable();
121+
}
121122

122-
// Scriptable render pipelines handle their own command buffers
123-
if (RuntimeUtilities.scriptableRenderPipelineActive)
123+
void CheckInitLegacy()
124+
{
125+
if (m_Camera != null && m_CurrentContext != null)
124126
return;
125127

126128
m_LegacyCmdBufferBeforeReflections = new CommandBuffer { name = "Deferred Ambient Occlusion" };
@@ -265,6 +267,8 @@ void OnPreCull()
265267
if (RuntimeUtilities.scriptableRenderPipelineActive)
266268
return;
267269

270+
CheckInitLegacy();
271+
268272
// Resets the projection matrix from previous frame in case TAA was enabled.
269273
// We also need to force reset the non-jittered projection matrix here as it's not done
270274
// when ResetProjectionMatrix() is called and will break transparent rendering if TAA

0 commit comments

Comments
 (0)