protected void OnEnable() { if (tonemapShader == null) { tonemapShader = Shader.Find("Hidden/TonemappingColorGrading"); } if (ImageEffectHelper.IsSupported(tonemapShader, false, true, this)) { return; } enabled = false; Debug.LogWarning("The image effect " + ToString() + " has been disabled as it's not supported on the current platform."); }
protected void OnEnable() { if (ssrShader == null) { ssrShader = Shader.Find("Hidden/ScreenSpaceReflection"); } if (!ImageEffectHelper.IsSupported(ssrShader, true, true, this)) { enabled = false; Debug.LogWarning("The image effect " + ToString() + " has been disabled as it's not supported on the current platform."); return; } GetComponent <Camera>().depthTextureMode |= DepthTextureMode.Depth; }
protected void OnEnable() { if (smaaShader == null) { smaaShader = Shader.Find("Hidden/SMAA"); } if (!ImageEffectHelper.IsSupported(smaaShader, true, true, this)) { enabled = false; Debug.LogWarning("The image effect " + ToString() + " has been disabled as it's not supported on the current platform."); return; } aaCamera.depthTextureMode |= DepthTextureMode.Depth; }