public override DepthTextureMode GetCameraFlags()
        {
            BuiltinDebugViewsModel.Mode mode             = base.model.settings.mode;
            DepthTextureMode            depthTextureMode = 0;

            if (mode != BuiltinDebugViewsModel.Mode.Normals)
            {
                if (mode != BuiltinDebugViewsModel.Mode.MotionVectors)
                {
                    if (mode == BuiltinDebugViewsModel.Mode.Depth)
                    {
                        depthTextureMode |= 1;
                    }
                }
                else
                {
                    depthTextureMode |= 5;
                }
            }
            else
            {
                depthTextureMode |= 2;
            }
            return(depthTextureMode);
        }
        public override void PopulateCommandBuffer(CommandBuffer cb)
        {
            BuiltinDebugViewsModel.Settings settings = base.model.settings;
            Material material = this.context.materialFactory.Get("Hidden/Post FX/Builtin Debug Views");

            material.shaderKeywords = null;
            if (this.context.isGBufferAvailable)
            {
                material.EnableKeyword("SOURCE_GBUFFER");
            }
            BuiltinDebugViewsModel.Mode mode = settings.mode;
            if (mode != BuiltinDebugViewsModel.Mode.Depth)
            {
                if (mode != BuiltinDebugViewsModel.Mode.Normals)
                {
                    if (mode == BuiltinDebugViewsModel.Mode.MotionVectors)
                    {
                        this.MotionVectorsPass(cb);
                    }
                }
                else
                {
                    this.DepthNormalsPass(cb);
                }
            }
            else
            {
                this.DepthPass(cb);
            }
            this.context.Interrupt();
        }
        public override DepthTextureMode GetCameraFlags()
        {
            BuiltinDebugViewsModel.Mode mode = base.model.settings.mode;
            DepthTextureMode            none = DepthTextureMode.None;

            if (mode == BuiltinDebugViewsModel.Mode.Normals)
            {
                none |= DepthTextureMode.DepthNormals;
            }
            else if (mode == BuiltinDebugViewsModel.Mode.MotionVectors)
            {
                none |= DepthTextureMode.MotionVectors | DepthTextureMode.Depth;
            }
            else if (mode == BuiltinDebugViewsModel.Mode.Depth)
            {
                none |= DepthTextureMode.Depth;
            }
            return(none);
        }
        public override DepthTextureMode GetCameraFlags()
        {
            BuiltinDebugViewsModel.Mode mode             = base.model.settings.mode;
            DepthTextureMode            depthTextureMode = DepthTextureMode.None;

            switch (mode)
            {
            case BuiltinDebugViewsModel.Mode.Depth:
                depthTextureMode |= DepthTextureMode.Depth;
                break;

            case BuiltinDebugViewsModel.Mode.Normals:
                depthTextureMode |= DepthTextureMode.DepthNormals;
                break;

            case BuiltinDebugViewsModel.Mode.MotionVectors:
                depthTextureMode |= (DepthTextureMode.Depth | DepthTextureMode.MotionVectors);
                break;
            }
            return(depthTextureMode);
        }
 public bool IsModeActive(BuiltinDebugViewsModel.Mode mode)
 {
     return(this.m_Settings.mode == mode);
 }