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

Commit 030b753

Browse files
authored
Merge pull request #173 from Unity-Technologies/depthmode-tweaks
Changed the stack behavior with regards to depthTextureMode handling
2 parents feaee80 + 54fcaeb commit 030b753

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

PostProcessing/Runtime/PostProcessingBehaviour.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void OnPreCull()
143143

144144
// Find out which camera flags are needed before rendering begins
145145
// Note that motion vectors will only be available one frame after being enabled
146-
var flags = DepthTextureMode.None;
146+
var flags = context.camera.depthTextureMode;
147147
foreach (var component in m_Components)
148148
{
149149
if (component.active)
@@ -329,10 +329,6 @@ void OnDisable()
329329

330330
m_Components.Clear();
331331

332-
// Reset camera mode
333-
if (m_Camera != null)
334-
m_Camera.depthTextureMode = DepthTextureMode.None;
335-
336332
// Factories
337333
m_MaterialFactory.Dispose();
338334
m_RenderTextureFactory.Dispose();

0 commit comments

Comments
 (0)