public static Shader CreateLightpassShader() { ShaderDescriptor vertexShader = new ShaderDescriptor(); vertexShader.Type = ShaderType.VertexShader; vertexShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}lightpass.vs"); ShaderDescriptor fragmentShader = new ShaderDescriptor(); fragmentShader.Type = ShaderType.FragmentShader; fragmentShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}lightpass.fs"); Shader shader = new Shader("Lightpass", vertexShader, fragmentShader); return(shader); }
public static Shader CreateUserInterfaceShader() { ShaderDescriptor vertexShader = new ShaderDescriptor(); vertexShader.Type = ShaderType.VertexShader; vertexShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}interface.vs"); ShaderDescriptor fragmentShader = new ShaderDescriptor(); fragmentShader.Type = ShaderType.FragmentShader; fragmentShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}texture.fs"); Shader shader = new Shader("User Interface", vertexShader, fragmentShader); return(shader); }
public static Shader CreateBackgroundShader() { ShaderDescriptor vertexShader = new ShaderDescriptor(); vertexShader.Type = ShaderType.VertexShader; vertexShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}background.vs"); ShaderDescriptor fragmentShader = new ShaderDescriptor(); fragmentShader.Type = ShaderType.FragmentShader; fragmentShader.SourceCode = System.IO.File.ReadAllText($"{ContentDirectory}background.fs"); Shader shader = new Shader("Texture", vertexShader, fragmentShader); return(shader); }