// Token: 0x060005FA RID: 1530 RVA: 0x0001D180 File Offset: 0x0001B380
 private static bool IsCameraEffect(global::UnityEngine.MonoBehaviour component)
 {
     return(global::EscalationVR.GameObjectExtensions.IsImageEffect(component.GetType()));
 }
Example #2
0
    // Token: 0x06000067 RID: 103 RVA: 0x00004AC0 File Offset: 0x00002CC0
    public void RenderNear()
    {
        int  num  = global::UnityEngine.Screen.width / 2;
        int  num2 = global::UnityEngine.Screen.height / 2;
        bool flag = this.cam.targetTexture == null || this.cam.targetTexture.width != num || this.cam.targetTexture.height != num2;

        if (flag)
        {
            this.cam.targetTexture = new global::UnityEngine.RenderTexture(num, num2, 24, 0);
            this.cam.targetTexture.antiAliasing = ((global::UnityEngine.QualitySettings.antiAliasing == 0) ? 1 : global::UnityEngine.QualitySettings.antiAliasing);
        }
        this.cam.nearClipPlane = this.config.near;
        this.cam.farClipPlane  = this.config.far;
        global::UnityEngine.CameraClearFlags clearFlags      = this.cam.clearFlags;
        global::UnityEngine.Color            backgroundColor = this.cam.backgroundColor;
        this.cam.clearFlags      = 2;
        this.cam.backgroundColor = global::UnityEngine.Color.clear;
        float num3 = global::UnityEngine.Mathf.Clamp(this.GetTargetDistance() + this.config.nearOffset, this.config.near, this.config.far);

        global::UnityEngine.Transform parent = this.clipQuad.transform.parent;
        this.clipQuad.transform.position = parent.position + parent.forward * num3;
        global::UnityEngine.MonoBehaviour[] array = null;
        bool[] array2 = null;
        bool   disableStandardAssets = this.config.disableStandardAssets;

        if (disableStandardAssets)
        {
            array  = this.cam.gameObject.GetComponents <global::UnityEngine.MonoBehaviour>();
            array2 = new bool[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                global::UnityEngine.MonoBehaviour monoBehaviour = array[i];
                bool flag2 = monoBehaviour.enabled && monoBehaviour.GetType().ToString().StartsWith("UnityStandardAssets.");
                if (flag2)
                {
                    monoBehaviour.enabled = false;
                    array2[i]             = true;
                }
            }
        }
        this.clipQuad.SetActive(true);
        this.cam.Render();
        this.clipQuad.SetActive(false);
        bool flag3 = array != null;

        if (flag3)
        {
            for (int j = 0; j < array.Length; j++)
            {
                bool flag4 = array2[j];
                if (flag4)
                {
                    array[j].enabled = true;
                }
            }
        }
        this.cam.clearFlags      = clearFlags;
        this.cam.backgroundColor = backgroundColor;
        global::UnityEngine.Graphics.DrawTexture(new global::UnityEngine.Rect(0f, 0f, (float)num, (float)num2), this.cam.targetTexture, this.colorMat);
        global::UnityEngine.Graphics.DrawTexture(new global::UnityEngine.Rect((float)num, 0f, (float)num, (float)num2), this.cam.targetTexture, this.alphaMat);
    }
Example #3
0
 // Token: 0x060002E9 RID: 745 RVA: 0x000111E0 File Offset: 0x0000F3E0
 public virtual bool IsAllowedEffect(global::UnityEngine.MonoBehaviour effect)
 {
     return(true);
 }