Package aspect.render.shader

Examples of aspect.render.shader.Shader


    public ViewModel model;

    public Trail(Vector3 pos, Vector3 vel, final Frigate source) {

        if (shader == null) {
            Shader vert = loadShader(new File("shaders/test.vert"), Shader.Type.VERTEX);
            Shader frag = loadShader(new File("shaders/test.frag"), Shader.Type.FRAGMENT);
            shader = new ShaderProgram(vert, frag);
        }
       
        Material mtl = new Material(shader);
        model = ellipse(mtl, 2.0f, 2.0f, 20);
View Full Code Here


        try {
            fbo = new FrameBuffer(1024, 1024, p);
            fbo.setRepeat(false);
            fbo.setFilter(GL11.GL_NEAREST, GL11.GL_NEAREST);
            Shader vert = Shader.loadPrebuilt("texture.vert", Shader.Type.VERTEX);
            Shader frag = loadShader(new File("shaders/test.frag"), Shader.Type.FRAGMENT);
            post = new ShaderProgram(vert, frag);
            fbo.postProcess(post);
        } catch (LWJGLException ex) {
            Logger.getLogger(AspectTest.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

        cube.pos = new Vector3(-1, 0, -4);
        cube.ang.pitch = -20;
        pipe = new Entity(pipe(material, 0.5f, 2, 60));
        pipe.pos = new Vector3(1, 0, -4);
       
        Shader vertex = new Shader(new File("shaders/example.vert"), Type.VERTEX);
        Shader fragment1 = new Shader(new File("shaders/example1.frag"), Type.FRAGMENT);
        Shader fragment2 = new Shader(new File("shaders/example2.frag"), Type.FRAGMENT);
       
        shader1 = new ShaderProgram(vertex, fragment1);
        shader2 = new ShaderProgram(vertex, fragment2);
        try {
            frameBuffer = new FrameBuffer(128, 128, DEFAULT_CAMERA);
View Full Code Here

    public static Texture getTexture(String name) {
        return TEXTURES.get(name);
    }

    public static Shader loadShader(File file, Shader.Type type) {
        return new Shader(file, type);
    }
View Full Code Here

    public static Shader loadShader(File file, Shader.Type type) {
        return new Shader(file, type);
    }

    public static Shader loadShader(InputStream stream, Shader.Type type) {
        return new Shader(loadTextFile(stream), type);
    }
View Full Code Here

    public static Shader loadShader(String name, File file, Shader.Type type) {
        if (SHADERS.containsKey(name)) {
            return SHADERS.get(name);
        }

        Shader shader = loadShader(file, type);
        addShader(name, shader);
        return shader;
    }
View Full Code Here

    public static Shader loadShader(String name, InputStream stream, Shader.Type type) {
        if (SHADERS.containsKey(name)) {
            return SHADERS.get(name);
        }

        Shader shader = loadShader(stream, type);
        addShader(name, shader);
        return shader;
    }
View Full Code Here

                case "shader:": {
                    if (args[1].equals("prebuilt")) {
                        m.shader = ShaderProgram.loadPrebuilt(args[2]);
                    } else {
                        Shader vert = loadShader(args[1], new File(args[1]), Shader.Type.VERTEX);
                        Shader frag = loadShader(args[2], new File(args[2]), Shader.Type.FRAGMENT);
                       
                        ShaderProgram shader = new ShaderProgram(vert, frag);
                       
                        m.shader = shader;
                    }
View Full Code Here

TOP

Related Classes of aspect.render.shader.Shader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.