Beispiel #1
0
        private AnalyzedShaderInfo CreateAnalyzedInfo(Shader shader)
        {
            AnalyzedShaderInfo info = null;
            var compiled            = CompileShaderUtil.GetCompileShaderText(shader);
            var parser = new CompiledShaderParser(compiled);

            info = ShaderDbUtil.Create(shader, parser);
            if (info != null)
            {
                this.shaderInfos[shader] = info;
            }
            return(info);
        }
Beispiel #2
0
        private AnalyzedShaderInfo GetAnalyzedShaderInfo(Shader shader)
        {
            AnalyzedShaderInfo info = null;

            if (this.shaderInfos == null)
            {
                this.shaderInfos = new Dictionary <Shader, AnalyzedShaderInfo>();
            }
            if (this.shaderInfos.TryGetValue(shader, out info))
            {
                return(info);
            }
            info = ShaderDbUtil.LoadShaderData(shader);
            if (info != null)
            {
                this.shaderInfos[shader] = info;
            }
            return(info);
        }
Beispiel #3
0
        private void AppendResult(AnalyzedShaderInfo info, FrameDebuggerEventData data)
        {
            if (info == null)
            {
                return;
            }
            var keywords = MaliocPluginUtility.KeywordStrToList(data.shaderKeywords);

            info.GetShaderMatchPrograms(programKeyInfo, keywords);
            foreach (var key in programKeyInfo)
            {
                var shaderProgramInfo = info.GetProgramInfo(key);

                if (key.passIndex == data.shaderPassIndex)
                {
                    InitShaderElementInfo(shaderProgramInfo);

                    this.resultPosition = this.currentPosition;
                    this.Repaint();
                    break;
                }
            }
        }