Ejemplo n.º 1
0
 public ShaderViewerData(string mode, ShaderInfo shaderInfo)
 {
     _mode          = (ShaderViewerMode)Enum.Parse(typeof(ShaderViewerMode), mode);
     MaxLOD         = ViewerConst.GetLodIndex(shaderInfo.MaxLOD);
     MaxLODStr      = ViewerConst.LoadSizeStr[MaxLOD];
     RenderQueue    = ViewerConst.GetRenderQueueIndex(shaderInfo.RenderQueue);
     RenderQueueStr = ViewerConst.RenderQueueStr[RenderQueue];
     Pass           = shaderInfo.Pass;
     Instruction    = ViewerConst.GetInstructionIndex(shaderInfo.Instruction);
     InstructionStr = ViewerConst.InstructionSizeStr[Instruction];
     Variant        = shaderInfo.Variant;
     Property       = shaderInfo.Property;
     SubShader      = shaderInfo.SubShader;
     Sample         = shaderInfo.Sample;
     RenderType     = shaderInfo.RenderType;
 }
Ejemplo n.º 2
0
        public override ColumnType[] GetShowTable(string shaderViewerMode)
        {
            ShaderViewerMode shaderViewerModeEnum = (ShaderViewerMode)Enum.Parse(typeof(ShaderViewerMode), shaderViewerMode);

            switch (shaderViewerModeEnum)
            {
            case ShaderViewerMode.MaxLOD:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("MaxLOD", "MaxLOD", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.RenderQueue:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("RenderQueue", "RenderQueue", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.Pass:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("Pass", "Pass", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.Instruction:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("Instruction", "Instruction", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.Variant:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("Variant", "Variant", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.Property:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("Property", "Property", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.SubShader:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("SubShader", "SubShader", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.Sample:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("Sample", "Sample", 0.2f, TextAnchor.MiddleCenter, "")
                });

            case ShaderViewerMode.RenderType:
                return(new ColumnType[] {
                    new ColumnType("Path", "Path", 0.8f, TextAnchor.MiddleLeft, ""),
                    new ColumnType("RenderType", "RenderType", 0.2f, TextAnchor.MiddleCenter, "")
                });

            default:
                throw new NotImplementedException();
            }
        }