Examples of activateFeature()


Examples of org.terasology.rendering.assets.material.Material.activateFeature()

    }

    private void renderHand(float bobOffset, float handMovementAnimationOffset) {
        Material shader = Assets.getMaterial("engine:prog.block");
        shader.activateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);

        shader.enable();
        shader.setFloat("sunlight", worldRenderer.getSunlightValue(), true);
        shader.setFloat("blockLight", worldRenderer.getBlockLightValue(), true);
        glBindTexture(GL11.GL_TEXTURE_2D, handTex.getId());
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

        shader.deactivateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);
    }

    private void renderIcon(TextureRegion iconTexture, float bobOffset, float handMovementAnimationOffset) {
        Material shader = Assets.getMaterial("engine:prog.block");
        shader.activateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);

        shader.enable();

        shader.setBoolean("textured", false, true);
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

        Block activeBlock = blockFamily.getArchetypeBlock();
        Vector3f playerPos = localPlayer.getPosition();

        // Adjust the brightness of the block according to the current position of the player
        Material shader = Assets.getMaterial("engine:prog.block");
        shader.activateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);

        shader.enable();

        glPushMatrix();
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

        if (isInvisible()) {
            return;
        }

        Material mat = Assets.getMaterial("engine:prog.block");
        mat.activateFeature(ShaderProgramFeature.FEATURE_USE_MATRIX_STACK);

        mat.enable();
        mat.setFloat("sunlight", sunlight);
        mat.setFloat("blockLight", blockLight);
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

        if (effectsTexture == null) {
            return;
        }

        Material defaultTextured = Assets.getMaterial("engine:prog.defaultTextured");
        defaultTextured.activateFeature(ShaderProgramFeature.FEATURE_ALPHA_REJECT);
        defaultTextured.enable();

        glBindTexture(GL11.GL_TEXTURE_2D, effectsTexture.getId());

        glEnable(GL11.GL_BLEND);
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

        PerformanceMonitor.startActivity("Render World (Reflection)");
        camera.lookThroughNormalized();
        skysphere.render(camera);

        Material chunkShader = Assets.getMaterial("engine:prog.chunk");
        chunkShader.activateFeature(ShaderProgramFeature.FEATURE_USE_FORWARD_LIGHTING);

        if (config.getRendering().isReflectiveWater()) {
            camera.lookThrough();

            glEnable(GL_LIGHT0);
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

            if (mode == ChunkRenderMode.DEFAULT || mode == ChunkRenderMode.REFLECTION) {
                shader = Assets.getMaterial("engine:prog.chunk");
                shader.enable();

                if (phase == ChunkMesh.RenderPhase.REFRACTIVE) {
                    shader.activateFeature(ShaderProgramFeature.FEATURE_REFRACTIVE_PASS);
                } else if (phase == ChunkMesh.RenderPhase.ALPHA_REJECT) {
                    shader.activateFeature(ShaderProgramFeature.FEATURE_ALPHA_REJECT);
                }

                shader.setFloat3("chunkPositionWorld", chunk.getPosition().x * ChunkConstants.SIZE_X,
 
View Full Code Here

Examples of org.terasology.rendering.assets.material.Material.activateFeature()

                shader.enable();

                if (phase == ChunkMesh.RenderPhase.REFRACTIVE) {
                    shader.activateFeature(ShaderProgramFeature.FEATURE_REFRACTIVE_PASS);
                } else if (phase == ChunkMesh.RenderPhase.ALPHA_REJECT) {
                    shader.activateFeature(ShaderProgramFeature.FEATURE_ALPHA_REJECT);
                }

                shader.setFloat3("chunkPositionWorld", chunk.getPosition().x * ChunkConstants.SIZE_X,
                        chunk.getPosition().y * ChunkConstants.SIZE_Y, chunk.getPosition().z * ChunkConstants.SIZE_Z);
                shader.setFloat("animated", chunk.isAnimated() ? 1.0f : 0.0f);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.