Example #1
0
        void OnEnable()
        {
            // Check if the shader is supported in the current platform.
            if (!ImageEffectHelper.IsSupported(aoShader, true, false, this))
            {
                enabled = false;
                return;
            }

            // Register the command buffer if in the ambient-only mode.
            if (ambientOnly)
            {
                targetCamera.AddCommandBuffer(CameraEvent.BeforeReflections, aoCommands);
            }

            // Enable depth textures which the occlusion source requires.
            if (occlusionSource == OcclusionSource.DepthTexture)
            {
                targetCamera.depthTextureMode |= DepthTextureMode.Depth;
            }

            if (occlusionSource != OcclusionSource.GBuffer)
            {
                targetCamera.depthTextureMode |= DepthTextureMode.DepthNormals;
            }
        }
Example #2
0
 // Token: 0x060075E4 RID: 30180 RVA: 0x0024001B File Offset: 0x0023E21B
 public void LLDBPKHDPKI(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.shader, false, true, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = true;
     }
 }
Example #3
0
 // Token: 0x060075BA RID: 30138 RVA: 0x0023FAD2 File Offset: 0x0023DCD2
 public void LLAJPKFNDIG(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.BNHIJFAKEIM(), true, false, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = true;
     }
 }
Example #4
0
 // Token: 0x060075DB RID: 30171 RVA: 0x0023FE19 File Offset: 0x0023E019
 public void GFLAINNLMBO(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.FMOMOEOJFKH(), false, true, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = true;
     }
 }
Example #5
0
 // Token: 0x060075E3 RID: 30179 RVA: 0x0023FFFF File Offset: 0x0023E1FF
 public void OnEnable(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.shader, true, false, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = false;
     }
 }
Example #6
0
 // Token: 0x060075D7 RID: 30167 RVA: 0x0023FDEA File Offset: 0x0023DFEA
 public void JBBCMAJIMCA(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.KHFBDENANNP(), true, false, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = true;
     }
 }
Example #7
0
 // Token: 0x060075D4 RID: 30164 RVA: 0x0023FDA5 File Offset: 0x0023DFA5
 public void HGIMCCHIPCP(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.KHFBDENANNP(), true, false, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = false;
     }
 }
Example #8
0
 // Token: 0x060075C0 RID: 30144 RVA: 0x0023FBD3 File Offset: 0x0023DDD3
 public void EBBOJPEPDCN(AntiAliasing DNFGMNFCBGA)
 {
     if (!ImageEffectHelper.IsSupported(this.FMOMOEOJFKH(), false, false, DNFGMNFCBGA))
     {
         DNFGMNFCBGA.enabled = true;
     }
 }
Example #9
0
 public void OnEnable(AntiAliasing owner)
 {
     if (!ImageEffectHelper.IsSupported(shader, true, false, owner))
     {
         owner.enabled = false;
     }
 }
Example #10
0
 private void OnEnable()
 {
     if (!ImageEffectHelper.IsSupported(shader, true, false, this))
     {
         enabled = false;
     }
 }
Example #11
0
 private void OnEnable()
 {
     if (ImageEffectHelper.IsSupported(this.shader, true, false, (MonoBehaviour)this))
     {
         return;
     }
     ((Behaviour)this).set_enabled(false);
 }
Example #12
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, false, false, this))
            {
                enabled = false;
            }

            m_RTU = new RenderTextureUtility();
        }
Example #13
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, false, true, this))
            {
                enabled = false;
                return;
            }

            GetComponent <Camera>().depthTextureMode |= DepthTextureMode.Depth;
        }
Example #14
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, true, false, this))
            {
                enabled = false;
            }

            camera_.depthTextureMode |= DepthTextureMode.Depth;

            UpdateProperties();
        }
Example #15
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, true, false, this))
            {
                enabled = false;
            }

            camera_.depthTextureMode |= DepthTextureMode.Depth;
            m_DistanceColorSource.m_GradientDirty = true;
            m_HeightColorSource.m_GradientDirty   = true;
        }
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, false, true, this))
            {
                enabled = false;
                return;
            }

            SetDirty();
            SetTonemapperDirty();
        }
Example #17
0
        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;
        }
Example #20
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(filmicDepthOfFieldShader, true, true, this) || !ImageEffectHelper.IsSupported(medianFilterShader, true, true, this))
            {
                enabled = false;
                return;
            }

            if (ImageEffectHelper.supportsDX11 && !ImageEffectHelper.IsSupported(textureBokehShader, true, true, this))
            {
                enabled = false;
                return;
            }

            ComputeBlurDirections(true);
            GetComponent <Camera>().depthTextureMode |= DepthTextureMode.Depth;
        }
Example #21
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, true, false, this))
            {
                enabled = false;
            }

            const int RT_NUM = 32;

            if (pool_rt1_ == null)
            {
                pool_rt1_ = new RenderTexture[RT_NUM];
            }
            if (pool_rt2_ == null)
            {
                pool_rt2_ = new RenderTexture[RT_NUM];
            }
        }
Example #22
0
        void OnEnable()
        {
            // Check if the shader is supported in the current platform.
            if (!ImageEffectHelper.IsSupported(aoShader, true, false, this))
            {
                enabled = false;
                return;
            }

            // Register the command buffer if in the ambient-only mode.
            if (ambientOnly)
            {
                targetCamera.AddCommandBuffer(CameraEvent.BeforeReflections, aoCommands);
            }

            // Requires DepthNormals when G-buffer is not available.
            if (!isGBufferAvailable)
            {
                targetCamera.depthTextureMode |= DepthTextureMode.DepthNormals;
            }
        }
Example #23
0
        protected void OnEnable()
        {
            if (filmicDepthOfFieldShader == null)
            {
                filmicDepthOfFieldShader = Shader.Find("Hidden/DepthOfField/DepthOfField");
            }

            if (medianFilterShader == null)
            {
                medianFilterShader = Shader.Find("Hidden/DepthOfField/MedianFilter");
            }

            if (textureBokehShader == null)
            {
                textureBokehShader = Shader.Find("Hidden/DepthOfField/BokehSplatting");
            }

            if (!ImageEffectHelper.IsSupported(filmicDepthOfFieldShader, true, true, this) ||
                !ImageEffectHelper.IsSupported(medianFilterShader, true, true, this)
                )
            {
                enabled = false;
                Debug.LogWarning("The image effect " + ToString() + " has been disabled as it's not supported on the current platform.");
                return;
            }

            if (ImageEffectHelper.supportsDX11)
            {
                if (!ImageEffectHelper.IsSupported(textureBokehShader, true, true, this))
                {
                    enabled = false;
                    Debug.LogWarning("The image effect " + ToString() + " has been disabled as it's not supported on the current platform.");
                    return;
                }
            }

            ComputeBlurDirections(true);
            GetComponent <Camera>().depthTextureMode |= DepthTextureMode.Depth;
        }
Example #24
0
        private void OnEnable()
        {
            if (!ImageEffectHelper.IsSupported(shader, false, true, this))
            {
                enabled = false;
                return;
            }

            camera_.depthTextureMode |= DepthTextureMode.Depth;

            kReflectionTextures = new int[5];

            kNormalAndRoughnessTexture = Shader.PropertyToID("_NormalAndRoughnessTexture");
            kHitPointTexture           = Shader.PropertyToID("_HitPointTexture");
            kReflectionTextures[0]     = Shader.PropertyToID("_ReflectionTexture0");
            kReflectionTextures[1]     = Shader.PropertyToID("_ReflectionTexture1");
            kReflectionTextures[2]     = Shader.PropertyToID("_ReflectionTexture2");
            kReflectionTextures[3]     = Shader.PropertyToID("_ReflectionTexture3");
            kReflectionTextures[4]     = Shader.PropertyToID("_ReflectionTexture4");
            kBlurTexture            = Shader.PropertyToID("_BlurTexture");
            kFilteredReflections    = Shader.PropertyToID("_FilteredReflections");
            kFinalReflectionTexture = Shader.PropertyToID("_FinalReflectionTexture");
            kTempTexture            = Shader.PropertyToID("_TempTexture");
        }