示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }