Exemple #1
0
    // Token: 0x060063C5 RID: 25541 RVA: 0x0032D8A8 File Offset: 0x0032BAA8
    public void KOGLCCNQJIC(RenderTexture PBHPQFLMQDB, RenderTexture OBEPQQEKFLC)
    {
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.BLDGCMKLEBC("!");

        material.shaderKeywords = null;
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.INPGLPEDINQ().taaSettings;
        if (this.JKKIGEHMMNM || this.CIHONEJIPHN == null || this.CIHONEJIPHN.width != PBHPQFLMQDB.width || this.CIHONEJIPHN.height != PBHPQFLMQDB.height)
        {
            if (this.CIHONEJIPHN)
            {
                RenderTexture.ReleaseTemporary(this.CIHONEJIPHN);
            }
            this.CIHONEJIPHN      = RenderTexture.GetTemporary(PBHPQFLMQDB.width, PBHPQFLMQDB.height, 1, PBHPQFLMQDB.format);
            this.CIHONEJIPHN.name = "Mega";
            Graphics.Blit(PBHPQFLMQDB, this.CIHONEJIPHN, material, 8);
        }
        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.GKOEDCLQOQL, new Vector4(taaSettings.sharpen, 461f, 1224f, 1206f));
        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.BOJMJGIQJPN, new Vector4(taaSettings.stationaryBlending, taaSettings.motionBlending, 546f, 653f));
        material.SetTexture(FOFDHFBCNKC.EELKOOEPCFJ.OKKONPEBLHN, PBHPQFLMQDB);
        material.SetTexture(FOFDHFBCNKC.EELKOOEPCFJ.CBGKPDCFKNP, this.CIHONEJIPHN);
        RenderTexture temporary = RenderTexture.GetTemporary(PBHPQFLMQDB.width, PBHPQFLMQDB.height, 1, PBHPQFLMQDB.format);

        temporary.name      = " times!";
        this.HGHGMDOGFNM[0] = OBEPQQEKFLC.colorBuffer;
        this.HGHGMDOGFNM[0] = temporary.colorBuffer;
        Graphics.SetRenderTarget(this.HGHGMDOGFNM, PBHPQFLMQDB.depthBuffer);
        LGJGBKJCKPH.FBQHMCHIOFB(material, (!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? 1 : 0);
        RenderTexture.ReleaseTemporary(this.CIHONEJIPHN);
        this.CIHONEJIPHN = temporary;
        this.JKKIGEHMMNM = false;
    }
Exemple #2
0
            public void Render(RenderTexture source, RenderTexture destination)
            {
                ApplyProjectionMatrices();

                Material material = context.materialFactory.Get(k_ShaderString);

                material.shaderKeywords = null;
                AntialiasingModel.TaaSettings taaSettings = model.settings.taaSettings;

                int activeEye    = (int)context.camera.stereoActiveEye % k_NumEyes;
                int pp           = m_HistoryPingPong[activeEye];
                var historyRead  = CheckHistory(activeEye, ++pp % k_NumEyes, source, material);
                var historyWrite = CheckHistory(activeEye, ++pp % k_NumEyes, source, material);

                m_HistoryPingPong[activeEye] = ++pp % k_NumEyes;

                material.SetVector(Uniforms._Jitter, jitterVector);
                material.SetVector(Uniforms._SharpenParameters, new Vector4(m_sharpenOverride ?? taaSettings.sharpen, 0f, 0f, 0f));
                material.SetVector(Uniforms._FinalBlendParameters, new Vector4(taaSettings.stationaryBlending, taaSettings.motionBlending, 6000f, 0f));
                material.SetTexture(Uniforms._MainTex, source);
                material.SetTexture(Uniforms._HistoryTex, historyRead);

                m_Mrt[0] = destination.colorBuffer;
                m_Mrt[1] = historyWrite.colorBuffer;
                Graphics.SetRenderTarget(m_Mrt, source.depthBuffer);
                GraphicsUtils.Blit(material, context.camera.orthographic ? 1 : 0);
                m_ResetHistory = false;
            }
Exemple #3
0
    // Token: 0x060063CC RID: 25548 RVA: 0x0032DF3C File Offset: 0x0032C13C
    public void ILCMMJMCPIE(RenderTexture PBHPQFLMQDB, RenderTexture OBEPQQEKFLC)
    {
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.INJNQNMOKKD("Hidden/Post FX/Temporal Anti-aliasing");

        material.shaderKeywords = null;
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.settings.taaSettings;
        if (this.JKKIGEHMMNM || this.CIHONEJIPHN == null || this.CIHONEJIPHN.width != PBHPQFLMQDB.width || this.CIHONEJIPHN.height != PBHPQFLMQDB.height)
        {
            if (this.CIHONEJIPHN)
            {
                RenderTexture.ReleaseTemporary(this.CIHONEJIPHN);
            }
            this.CIHONEJIPHN      = RenderTexture.GetTemporary(PBHPQFLMQDB.width, PBHPQFLMQDB.height, 0, PBHPQFLMQDB.format);
            this.CIHONEJIPHN.name = "TAA History";
            Graphics.Blit(PBHPQFLMQDB, this.CIHONEJIPHN, material, 2);
        }
        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.GKOEDCLQOQL, new Vector4(taaSettings.sharpen, 0f, 0f, 0f));
        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.BOJMJGIQJPN, new Vector4(taaSettings.stationaryBlending, taaSettings.motionBlending, 6000f, 0f));
        material.SetTexture(FOFDHFBCNKC.EELKOOEPCFJ.OKKONPEBLHN, PBHPQFLMQDB);
        material.SetTexture(FOFDHFBCNKC.EELKOOEPCFJ.CBGKPDCFKNP, this.CIHONEJIPHN);
        RenderTexture temporary = RenderTexture.GetTemporary(PBHPQFLMQDB.width, PBHPQFLMQDB.height, 0, PBHPQFLMQDB.format);

        temporary.name      = "TAA History";
        this.HGHGMDOGFNM[0] = OBEPQQEKFLC.colorBuffer;
        this.HGHGMDOGFNM[1] = temporary.colorBuffer;
        Graphics.SetRenderTarget(this.HGHGMDOGFNM, PBHPQFLMQDB.depthBuffer);
        LGJGBKJCKPH.FBQHMCHIOFB(material, (!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? 0 : 1);
        RenderTexture.ReleaseTemporary(this.CIHONEJIPHN);
        this.CIHONEJIPHN = temporary;
        this.JKKIGEHMMNM = false;
    }
Exemple #4
0
            /// <summary>
            /// Generates a jittered projection matrix for a given camera.
            /// </summary>
            /// <param name="camera">The camera to get a jittered projection matrix for.</param>
            /// <returns>A jittered projection matrix.</returns>
            public Matrix4x4 GetJitteredProjectionMatrix(Camera camera, Func <Vector2, Matrix4x4> jitteredFunc)
            {
                AntialiasingModel.TaaSettings taaSettings = model.settings.taaSettings;
                Matrix4x4 cameraProj;

                jitterVector  = GenerateRandomOffset();
                jitterVector *= taaSettings.jitterSpread;

                if (jitteredFunc != null)
                {
                    cameraProj = jitteredFunc(jitterVector);
                }
                else
                {
                    cameraProj = camera.orthographic
                        ? PostProcessingUtils.GetJitteredOrthographicProjectionMatrix(camera, jitterVector)
                        : PostProcessingUtils.GetJitteredPerspectiveProjectionMatrix(camera, jitterVector);
                }

                jitterVector = new Vector2(jitterVector.x / camera.pixelWidth, jitterVector.y / camera.pixelHeight);
                return(cameraProj);
            }
Exemple #5
0
    // Token: 0x060063B9 RID: 25529 RVA: 0x0032D4D0 File Offset: 0x0032B6D0
    public void KINEIBMJENM(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.KKJKEOPIHLO().taaSettings;
        Vector2 vector = this.KJOMJFENIGG();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.QKQCBMOIMMB(vector) : this.NFPOIPOQDEB(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = true;
        vector.x /= (float)this.BEHMQBIFCOJ.CQNLNDBFFFP();
        vector.y /= (float)this.BEHMQBIFCOJ.ONCCDMLHNQL();
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.NONHJLIJQIP(" (Completed)");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.MFPIJHIGNHI(vector);
    }
Exemple #6
0
    // Token: 0x060063B6 RID: 25526 RVA: 0x0032D3B8 File Offset: 0x0032B5B8
    public void DMFBPPHHDEO(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.KKJKEOPIHLO().taaSettings;
        Vector2 vector = this.KJOMJFENIGG();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.QKQCBMOIMMB(vector) : this.MPBDNODGIHH(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = true;
        vector.x /= (float)this.BEHMQBIFCOJ.KJGMGPCEJJD;
        vector.y /= (float)this.BEHMQBIFCOJ.JHHQQQGMQBM();
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.DHLOEEOKKCL(". Vertex Count: ");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.CGLOQGHDLEF = vector;
    }
Exemple #7
0
    // Token: 0x060063C7 RID: 25543 RVA: 0x0032DB94 File Offset: 0x0032BD94
    public void FGNDQFLCQJJ(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.KNBMBCNPNLF().taaSettings;
        Vector2 vector = this.CKNKBMIHNPF();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.QKQCBMOIMMB(vector) : this.KGECNQGNNEO(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = true;
        vector.x /= (float)this.BEHMQBIFCOJ.KJGMGPCEJJD;
        vector.y /= (float)this.BEHMQBIFCOJ.JKGBHEHKBPC();
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.NJKNIOFBHBD(")");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.JILCMLLOECQ(vector);
    }
Exemple #8
0
    // Token: 0x060063C6 RID: 25542 RVA: 0x0032DA7C File Offset: 0x0032BC7C
    public void DLOIJEMNCML(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.KNBMBCNPNLF().taaSettings;
        Vector2 vector = this.CKNKBMIHNPF();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.QKQCBMOIMMB(vector) : this.KGECNQGNNEO(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = false;
        vector.x /= (float)this.BEHMQBIFCOJ.CQNLNDBFFFP();
        vector.y /= (float)this.BEHMQBIFCOJ.DFKQMMIQDOO;
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.QJGFMDNNQLB("!\r\n");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.PNLPGDJGMIL(vector);
    }
Exemple #9
0
    // Token: 0x060063BF RID: 25535 RVA: 0x0032D738 File Offset: 0x0032B938
    public void GMPBDDDCIHK(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.settings.taaSettings;
        Vector2 vector = this.CKNKBMIHNPF();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.GJBLJCJMNGD(vector) : this.NFPOIPOQDEB(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = false;
        vector.x /= (float)this.BEHMQBIFCOJ.KJGMGPCEJJD;
        vector.y /= (float)this.BEHMQBIFCOJ.DFKQMMIQDOO;
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.INJNQNMOKKD("Hidden/Post FX/Temporal Anti-aliasing");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.CGLOQGHDLEF = vector;
    }
Exemple #10
0
    // Token: 0x060063BC RID: 25532 RVA: 0x0032D620 File Offset: 0x0032B820
    public void PLEJDCFBKLC(Func <Vector2, Matrix4x4> NQHCHCGEIJH)
    {
        AntialiasingModel.TaaSettings taaSettings = base.FIFNHCKNDQE.settings.taaSettings;
        Vector2 vector = this.CKNKBMIHNPF();

        vector *= taaSettings.jitterSpread;
        this.BEHMQBIFCOJ.LNCKNGKGHLN.nonJitteredProjectionMatrix = this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix;
        if (NQHCHCGEIJH != null)
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = NQHCHCGEIJH(vector);
        }
        else
        {
            this.BEHMQBIFCOJ.LNCKNGKGHLN.projectionMatrix = ((!this.BEHMQBIFCOJ.LNCKNGKGHLN.orthographic) ? this.HPGJMQBEKLQ(vector) : this.KGECNQGNNEO(vector));
        }
        this.BEHMQBIFCOJ.LNCKNGKGHLN.useJitteredProjectionMatrixForTransparentRendering = true;
        vector.x /= (float)this.BEHMQBIFCOJ.CQNLNDBFFFP();
        vector.y /= (float)this.BEHMQBIFCOJ.ONCCDMLHNQL();
        Material material = this.BEHMQBIFCOJ.GOQBDJHFOPK.QDMHMMGFIOJ("BuffIcon");

        material.SetVector(FOFDHFBCNKC.EELKOOEPCFJ.IEFMFLIGLDO, vector);
        this.MFHICNCOOIH(vector);
    }
Exemple #11
0
            /// <summary>
            /// Prepares the jittered and non jittered projection matrices for stereo rendering.
            /// </summary>
            /// <param name="context">The current post-processing context.</param>
            // TODO: We'll probably need to isolate most of this for SRPs
            public void ConfigureStereoJitteredProjectionMatrices(Func <Vector2, Matrix4x4> jitteredFunc)
            {
                AntialiasingModel.TaaSettings taaSettings = model.settings.taaSettings;
                var camera = context.camera;
                var eye    = (Camera.StereoscopicEye)camera.stereoActiveEye;

                jitterVector  = GenerateRandomOffset();
                jitterVector *= taaSettings.jitterSpread;

                // This saves off the device generated projection matrices as non-jittered
                context.camera.CopyStereoDeviceProjectionMatrixToNonJittered(eye);
                var originalProj = context.camera.GetStereoNonJitteredProjectionMatrix(eye);

                // Currently no support for custom jitter func, as VR devices would need to provide
                // original projection matrix as input along with jitter
                var jitteredMatrix = PostProcessingUtils.GenerateJitteredProjectionMatrixFromOriginal(context, originalProj, jitterVector);

                context.camera.SetStereoProjectionMatrix(eye, jitteredMatrix);

                // jitter has to be scaled for the actual eye texture size, not just the intermediate texture size
                // which could be double-wide in certain stereo rendering scenarios
                jitterVector = new Vector2(jitterVector.x / context.width, jitterVector.y / context.height);
                camera.useJitteredProjectionMatrixForTransparentRendering = false;
            }