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

Commit bba6578

Browse files
committed
Fixed debug monitors on SRPs
1 parent 3335932 commit bba6578

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

PostProcessing/Runtime/PostProcessDebug.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public sealed class PostProcessDebug : MonoBehaviour
1616

1717
Camera m_CurrentCamera;
1818
CommandBuffer m_CmdAfterEverything;
19-
19+
2020
void OnEnable()
2121
{
2222
m_CmdAfterEverything = new CommandBuffer { name = "Post-processing Debug Overlay" };
@@ -41,7 +41,7 @@ void OnDisable()
4141
m_CurrentCamera = null;
4242
m_PreviousPostProcessLayer = null;
4343
}
44-
44+
4545
#if !UNITY_EDITOR
4646
void Update()
4747
{
@@ -103,6 +103,9 @@ void OnGUI()
103103
if (postProcessLayer == null || !postProcessLayer.enabled)
104104
return;
105105

106+
// Some SRPs don't unbind render targets and leave them as-is
107+
RenderTexture.active = null;
108+
106109
var rect = new Rect(5, 5, 0, 0);
107110
var debugLayer = postProcessLayer.debugLayer;
108111
DrawMonitor(ref rect, debugLayer.lightMeter, lightMeter);

0 commit comments

Comments
 (0)