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); }
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); }