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

Commit 1e1fcbc

Browse files
committed
Micro optim
1 parent e5f01e9 commit 1e1fcbc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

PostProcessing/Runtime/PostProcessingBehaviour.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ void OnRenderImage(RenderTexture source, RenderTexture destination)
195195
var uberMaterial = m_MaterialFactory.Get("Hidden/Post FX/Uber Shader");
196196
uberMaterial.shaderKeywords = null;
197197

198-
if (!GraphicsUtils.isLinearColorSpace)
199-
uberMaterial.EnableKeyword("UNITY_COLORSPACE_GAMMA");
200-
201198
var src = source;
202199
var dst = destination;
203200

@@ -266,7 +263,12 @@ void OnRenderImage(RenderTexture source, RenderTexture destination)
266263
uberActive |= TryPrepareUberImageEffect(m_Dithering, uberMaterial);
267264

268265
if (uberActive)
266+
{
267+
if (!GraphicsUtils.isLinearColorSpace)
268+
uberMaterial.EnableKeyword("UNITY_COLORSPACE_GAMMA");
269+
269270
Graphics.Blit(src, dst, uberMaterial, 0);
271+
}
270272
}
271273

272274
if (!uberActive && !fxaaActive)

0 commit comments

Comments
 (0)