private void MotionVectorsPass(CommandBuffer cb)
        {
            Material material = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");

            BuiltinDebugViewsModel.MotionVectorsSettings motionVectors = base.model.settings.motionVectors;
            int nameID = BuiltinDebugViewsComponent.Uniforms._TempRT;

            cb.GetTemporaryRT(nameID, this.context.width, this.context.height, 0, FilterMode.Bilinear);
            cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.sourceOpacity);
            cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, BuiltinRenderTextureType.CameraTarget);
            cb.Blit(BuiltinRenderTextureType.CameraTarget, nameID, material, 2);
            if (motionVectors.motionImageOpacity > 0f && motionVectors.motionImageAmplitude > 0f)
            {
                int tempRT = BuiltinDebugViewsComponent.Uniforms._TempRT2;
                cb.GetTemporaryRT(tempRT, this.context.width, this.context.height, 0, FilterMode.Bilinear);
                cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.motionImageOpacity);
                cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Amplitude, motionVectors.motionImageAmplitude);
                cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, nameID);
                cb.Blit(nameID, tempRT, material, 3);
                cb.ReleaseTemporaryRT(nameID);
                nameID = tempRT;
            }
            if (motionVectors.motionVectorsOpacity > 0f && motionVectors.motionVectorsAmplitude > 0f)
            {
                this.PrepareArrows();
                float num = 1f / (float)motionVectors.motionVectorsResolution;
                float x   = num * (float)this.context.height / (float)this.context.width;
                cb.SetGlobalVector(BuiltinDebugViewsComponent.Uniforms._Scale, new Vector2(x, num));
                cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Opacity, motionVectors.motionVectorsOpacity);
                cb.SetGlobalFloat(BuiltinDebugViewsComponent.Uniforms._Amplitude, motionVectors.motionVectorsAmplitude);
                cb.DrawMesh(this.m_Arrows.mesh, Matrix4x4.identity, material, 0, 4);
            }
            cb.SetGlobalTexture(BuiltinDebugViewsComponent.Uniforms._MainTex, nameID);
            cb.Blit(nameID, BuiltinRenderTextureType.CameraTarget);
            cb.ReleaseTemporaryRT(nameID);
        }
        private void MotionVectorsPass(CommandBuffer cb)
        {
            Material mat = base.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");

            BuiltinDebugViewsModel.MotionVectorsSettings motionVectors = base.model.settings.motionVectors;
            int nameID = Uniforms._TempRT;

            cb.GetTemporaryRT(nameID, base.context.width, base.context.height, 0, FilterMode.Bilinear);
            cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.sourceOpacity);
            cb.SetGlobalTexture(Uniforms._MainTex, 2);
            cb.Blit(2, nameID, mat, 2);
            if ((motionVectors.motionImageOpacity > 0f) && (motionVectors.motionImageAmplitude > 0f))
            {
                int num2 = Uniforms._TempRT2;
                cb.GetTemporaryRT(num2, base.context.width, base.context.height, 0, FilterMode.Bilinear);
                cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.motionImageOpacity);
                cb.SetGlobalFloat(Uniforms._Amplitude, motionVectors.motionImageAmplitude);
                cb.SetGlobalTexture(Uniforms._MainTex, nameID);
                cb.Blit(nameID, num2, mat, 3);
                cb.ReleaseTemporaryRT(nameID);
                nameID = num2;
            }
            if ((motionVectors.motionVectorsOpacity > 0f) && (motionVectors.motionVectorsAmplitude > 0f))
            {
                this.PrepareArrows();
                float y = 1f / ((float)motionVectors.motionVectorsResolution);
                float x = (y * base.context.height) / ((float)base.context.width);
                cb.SetGlobalVector(Uniforms._Scale, new Vector2(x, y));
                cb.SetGlobalFloat(Uniforms._Opacity, motionVectors.motionVectorsOpacity);
                cb.SetGlobalFloat(Uniforms._Amplitude, motionVectors.motionVectorsAmplitude);
                cb.DrawMesh(this.m_Arrows.mesh, Matrix4x4.identity, mat, 0, 4);
            }
            cb.SetGlobalTexture(Uniforms._MainTex, nameID);
            cb.Blit(nameID, 2);
            cb.ReleaseTemporaryRT(nameID);
        }