public override void Prepare(Material uberMaterial)
        {
            ChromaticAberrationModel.Settings settings = base.model.settings;
            Texture2D texture2D = settings.spectralTexture;

            if (texture2D == null)
            {
                if (this.m_SpectrumLut == null)
                {
                    this.m_SpectrumLut = new Texture2D(3, 1, 3, false)
                    {
                        name       = "Chromatic Aberration Spectrum Lookup",
                        filterMode = 1,
                        wrapMode   = 1,
                        anisoLevel = 0,
                        hideFlags  = 52
                    };
                    Color[] pixels = new Color[]
                    {
                        new Color(1f, 0f, 0f),
                        new Color(0f, 1f, 0f),
                        new Color(0f, 0f, 1f)
                    };
                    this.m_SpectrumLut.SetPixels(pixels);
                    this.m_SpectrumLut.Apply();
                }
                texture2D = this.m_SpectrumLut;
            }
            uberMaterial.EnableKeyword("CHROMATIC_ABERRATION");
            uberMaterial.SetFloat(ChromaticAberrationComponent.Uniforms._ChromaticAberration_Amount, settings.intensity * 0.03f);
            uberMaterial.SetTexture(ChromaticAberrationComponent.Uniforms._ChromaticAberration_Spectrum, texture2D);
        }
Пример #2
0
 void Update() {
     if (Time.time <= lastCrashTime + chromaticAberrationDuration) {
         UnityEngine.PostProcessing.ChromaticAberrationModel.Settings chromaticAberrationSettings = profile.chromaticAberration.settings;
         chromaticAberrationSettings.intensity = Mathf.Sin((Time.time - lastCrashTime) * Mathf.PI / chromaticAberrationDuration);
         profile.chromaticAberration.settings = chromaticAberrationSettings;
     }
 }
Пример #3
0
        public override void Prepare(Material uberMaterial)
        {
            ChromaticAberrationModel.Settings settings = base.model.settings;
            Texture2D spectralTexture = settings.spectralTexture;

            if (spectralTexture == null)
            {
                if (this.m_SpectrumLut == null)
                {
                    Texture2D textured2 = new Texture2D(3, 1, TextureFormat.RGB24, false)
                    {
                        name       = "Chromatic Aberration Spectrum Lookup",
                        filterMode = FilterMode.Bilinear,
                        wrapMode   = TextureWrapMode.Clamp,
                        anisoLevel = 0,
                        hideFlags  = HideFlags.DontSave
                    };
                    this.m_SpectrumLut = textured2;
                    Color[] colors = new Color[] { new Color(1f, 0f, 0f), new Color(0f, 1f, 0f), new Color(0f, 0f, 1f) };
                    this.m_SpectrumLut.SetPixels(colors);
                    this.m_SpectrumLut.Apply();
                }
                spectralTexture = this.m_SpectrumLut;
            }
            uberMaterial.EnableKeyword("CHROMATIC_ABERRATION");
            uberMaterial.SetFloat(Uniforms._ChromaticAberration_Amount, settings.intensity * 0.03f);
            uberMaterial.SetTexture(Uniforms._ChromaticAberration_Spectrum, spectralTexture);
        }
Пример #4
0
        // Use this for initialization
        void Start()
        {
            ppBehaviour.profile = mainPP;

            ChromaticAberrationModel.Settings chromaSettings = waterPP.chromaticAberration.settings;
            chromaSettings.intensity             = waterPPChromaticAberration;
            waterPP.chromaticAberration.settings = chromaSettings;
        }
Пример #5
0
 // Token: 0x06006640 RID: 26176 RVA: 0x00027776 File Offset: 0x00025976
 public void NFMQIGOIPLI(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #6
0
 // Token: 0x0600666F RID: 26223 RVA: 0x00027776 File Offset: 0x00025976
 public void EODOLDLQKFF(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #7
0
 // Token: 0x0600666D RID: 26221 RVA: 0x00027776 File Offset: 0x00025976
 public void MPKMQMEDKGF(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #8
0
 // Token: 0x06006669 RID: 26217 RVA: 0x00027776 File Offset: 0x00025976
 public void BIIDDQIJKLC(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #9
0
 // Token: 0x06006668 RID: 26216 RVA: 0x00027776 File Offset: 0x00025976
 public void JEBECPKGQGL(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #10
0
 // Token: 0x0600664F RID: 26191 RVA: 0x00027776 File Offset: 0x00025976
 public void ICDPFEKQIFP(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #11
0
 // Token: 0x06006664 RID: 26212 RVA: 0x00027776 File Offset: 0x00025976
 public void ODDDPHKFFBC(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #12
0
 // Token: 0x0600665A RID: 26202 RVA: 0x00027776 File Offset: 0x00025976
 public void OLNBCBOIFPH(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #13
0
 // Token: 0x06006657 RID: 26199 RVA: 0x00027776 File Offset: 0x00025976
 public void IGDBOKPMHHJ(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #14
0
 // Token: 0x06006654 RID: 26196 RVA: 0x00027776 File Offset: 0x00025976
 public void BIKBFDDEDDC(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #15
0
 // Token: 0x06006652 RID: 26194 RVA: 0x00027776 File Offset: 0x00025976
 public void QDBINMDOHOM(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #16
0
 // Token: 0x06006651 RID: 26193 RVA: 0x00027776 File Offset: 0x00025976
 public void CKEBGJBCHHE(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #17
0
 // Token: 0x06006650 RID: 26192 RVA: 0x00027776 File Offset: 0x00025976
 public void FIHCDJGMDOJ(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #18
0
 // Token: 0x06006644 RID: 26180 RVA: 0x00027776 File Offset: 0x00025976
 public void BDHIBKIPOHG(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #19
0
 // Token: 0x06006646 RID: 26182 RVA: 0x00027776 File Offset: 0x00025976
 public void GPPDLCKFHCP(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #20
0
 // Token: 0x06006667 RID: 26215 RVA: 0x00027776 File Offset: 0x00025976
 public void EEFBCIFLKDH(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #21
0
 // Token: 0x06006665 RID: 26213 RVA: 0x00027776 File Offset: 0x00025976
 public void PKDDQMMGKQD(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }
Пример #22
0
 // Token: 0x0600664B RID: 26187 RVA: 0x00027776 File Offset: 0x00025976
 public void EOONHGFEMDO(ChromaticAberrationModel.Settings BGBMIEJJQKC)
 {
     this.m_Settings = BGBMIEJJQKC;
 }