Example #1
0
        public string VariableBlobToString(FX9.Parameter key, int index = 0)
        {
            if (!EffectChunk.VariableBlobLookup.ContainsKey(key))
            {
                return($"Key not found");
            }
            var data = EffectChunk.VariableBlobLookup[key][index];

            if (data == null)
            {
                return("Blob is NULL");
            }
            if (data.IsShader)
            {
                var funcName = ShaderNames[data];
                return($"compile {data.Shader.Type.GetDescription()}_{data.Shader.MajorVersion}_{data.Shader.MinorVersion} {funcName}()");
            }
            else if (key.ParameterType == ParameterType.String)
            {
                return($"\"{data.Value}\"");
            }
            else
            {
                return($"<{data.Value}>");
            }
        }