diff -u -r -b ./PostProcessing/Runtime/Effects/AmbientOcclusion.cs /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/AmbientOcclusion.cs --- ./PostProcessing/Runtime/Effects/AmbientOcclusion.cs 2018-04-10 14:50:11.438863300 +0200 +++ /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/AmbientOcclusion.cs 2018-08-07 10:59:57.107523000 +0200 @@ -64,13 +64,20 @@ [Tooltip("Number of sample points, which affects quality and performance. Lowest, Low & Medium passes are downsampled. High and Ultra are not and should only be used on high-end hardware.")] public AmbientOcclusionQualityParameter quality = new AmbientOcclusionQualityParameter { value = AmbientOcclusionQuality.Medium }; + // sample-game begin: added globalEnable + public static bool globalEnable = true; + // sample-game end + // SRPs can call this method without a context set (see HDRP) // We need a better way to handle this than checking for a null context, context should // never be null. public override bool IsEnabledAndSupported(PostProcessRenderContext context) { + // sample-game begin: added globalEnable bool state = enabled.value + && globalEnable && intensity.value > 0f; + // sample-game end if (mode.value == AmbientOcclusionMode.ScalableAmbientObscurance) { diff -u -r -b ./PostProcessing/Runtime/Effects/Bloom.cs /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/Bloom.cs --- ./PostProcessing/Runtime/Effects/Bloom.cs 2018-08-08 09:39:37.675927300 +0200 +++ /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/Bloom.cs 2018-08-07 10:59:57.123525300 +0200 @@ -46,10 +46,17 @@ [Min(0f), Tooltip("Amount of dirtiness."), DisplayName("Intensity")] public FloatParameter dirtIntensity = new FloatParameter { value = 0f }; + // sample-game begin: added globalEnable + public static bool globalEnable = true; + // sample-game end: + public override bool IsEnabledAndSupported(PostProcessRenderContext context) { + // sample-game begin: added globalEnable return enabled.value + && globalEnable && intensity.value > 0f; + // sample-game end: } } diff -u -r -b ./PostProcessing/Runtime/Effects/Grain.cs /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/Grain.cs --- ./PostProcessing/Runtime/Effects/Grain.cs 2018-08-08 09:39:37.676928900 +0200 +++ /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/Grain.cs 2018-08-07 10:59:57.175524300 +0200 @@ -18,10 +18,17 @@ [Range(0f, 1f), DisplayName("Luminance Contribution"), Tooltip("Controls the noisiness response curve based on scene luminance. Lower values mean less noise in dark areas.")] public FloatParameter lumContrib = new FloatParameter { value = 0.8f }; + // sample-game begin: added globalEnable + public static bool globalEnable = true; + // sample-game end: + public override bool IsEnabledAndSupported(PostProcessRenderContext context) { + // sample-game begin: added globalEnable return enabled.value + && globalEnable && intensity.value > 0f; + // sample-game end: } } diff -u -r -b ./PostProcessing/Runtime/Effects/MotionBlur.cs /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/MotionBlur.cs --- ./PostProcessing/Runtime/Effects/MotionBlur.cs 2018-04-10 14:50:11.453861500 +0200 +++ /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/MotionBlur.cs 2018-08-07 10:59:57.190481800 +0200 @@ -12,10 +12,17 @@ [Range(4, 32), Tooltip("The amount of sample points, which affects quality and performances.")] public IntParameter sampleCount = new IntParameter { value = 10 }; + // sample-game begin: added globalEnable + public static bool globalEnable = true; + // sample-game end: + public override bool IsEnabledAndSupported(PostProcessRenderContext context) { + // sample-game begin: added globalEnable return enabled.value && shutterAngle.value > 0f + && globalEnable + // sample-game end: #if UNITY_EDITOR // Don't render motion blur preview when the editor is not playing as it can in some // cases results in ugly artifacts (i.e. when resizing the game view). diff -u -r -b ./PostProcessing/Runtime/Effects/ScreenSpaceReflections.cs /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/ScreenSpaceReflections.cs --- ./PostProcessing/Runtime/Effects/ScreenSpaceReflections.cs 2018-08-08 09:39:37.678927100 +0200 +++ /c/p4/petera_cph-merge/prototype01/main/ProjectFolder/Packages/com.unity.postprocessing/PostProcessing/Runtime/Effects/ScreenSpaceReflections.cs 2018-08-07 10:59:57.220480300 +0200 @@ -46,9 +46,16 @@ [Range(0f, 1f), Tooltip("Fades reflections close to the screen edges.")] public FloatParameter vignette = new FloatParameter { value = 0.5f }; + // sample-game begin: added globalEnable + public static bool globalEnable = true; + // sample-game end: + public override bool IsEnabledAndSupported(PostProcessRenderContext context) { + // sample-game begin: added globalEnable return enabled + && globalEnable + // sample-game end: && context.camera.actualRenderingPath == RenderingPath.DeferredShading && SystemInfo.supportsMotionVectors && SystemInfo.supportsComputeShaders