Esempio n. 1
0
        public static List <string> VertexSourceLookup(VertexFormat vertexFormat, ShaderVersion vertexShaderVersion)
        {
            var toReturn = new List <string>()
            {
                ShaderVersionUtilites.VersionTag(vertexShaderVersion)
            };

            if (vertexFormat == VertexFormat.Plain)
            {
                toReturn.AddRange(_VertexSourceGL_Simplest);
            }
            else if (vertexFormat == VertexFormat.WithColor)
            {
                toReturn.AddRange(_VertexSourceGL_Color);
            }
            else if (vertexFormat == VertexFormat.WithTexture)
            {
                toReturn.AddRange(_VertexSourceGL_Tex);
            }
            else if (vertexFormat == VertexFormat.WithColorAndTexture)
            {
                toReturn.AddRange(_VertexSourceGL_ColorAndTex);
            }

            return(toReturn);
        }
Esempio n. 2
0
        private static List <string> ModifyLinesForShaderToy(List <string> inputLines, ShaderVersion fragmentShaderVersion, List <KnownFragmentShaderUniform> uniforms)
        {
            List <string> toReturn = new List <string>()
            {
                ShaderVersionUtilites.VersionTag(fragmentShaderVersion)
            };

            toReturn.AddRange(uniforms.Select(x => UniformTypeToUniformDeclaration.Definitions[x]));
            toReturn.AddRange(inputLines);
            toReturn.AddRange(mainFunctionPostPend);
            return(toReturn);
        }