Examples of BlendState


Examples of com.ardor3d.renderer.state.BlendState

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
        _shapeRoot.setRenderState(ts);

        final BlendState bs = new BlendState();
        bs.setBlendEnabled(true);
        _shapeRoot.setRenderState(bs);

        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
        _shapeRoot.setRenderState(ms);
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        smoke.setEndColor(new ColorRGBA(.22f, .2f, .18f, 0.0f));
        smoke.setInitialVelocity(0.03f);
        smoke.setParticleEmitter(new MeshEmitter(emitDisc, false));
        smoke.setRotateWithScene(true);

        final BlendState blend = new BlendState();
        blend.setBlendEnabled(true);
        blend.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
        blend.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha);
        smoke.setRenderState(blend);

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/flare.png", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        _screenQuad = new Quad("0", cam.getWidth(), cam.getHeight());
        _screenQuad.setTranslation(cam.getWidth() / 2, cam.getHeight() / 2, 0);
        _screenQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);
        _screenQuad.getSceneHints().setLightCombineMode(LightCombineMode.Off);
        _blurBlend = new BlendState();
        _blurBlend.setBlendEnabled(true);
        _blurBlend.setEnabled(true);
        _blurBlend.setConstantColor(_blurFactor);
        _blurBlend.setSourceFunction(BlendState.SourceFunction.ConstantAlpha);
        _blurBlend.setDestinationFunctionRGB(DestinationFunction.OneMinusConstantAlpha);
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
        _root.setRenderState(ts);

        final BlendState bs = new BlendState();
        bs.setBlendEnabled(true);
        _root.setRenderState(bs);

        // Set up a reusable pick results
        _pickResults = new BoundingPickResults();
        _pickResults.setCheckDistance(true);
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        // antialiased.setStipplePattern((short) 0xFFF0);

        // Antialiased lines work by adding small pixels to the line with alpha blending values.
        // To make use of this, you need to add a blend state that blends the source color
        // with the destination color using the source alpha.
        final BlendState blend = new BlendState();
        blend.setBlendEnabled(true);
        // use source color * source alpha + (1-source color) * destination color.
        // (Note: for an interesting effect, switch them so it is OneMinusSourceAlpha/SourceAlpha.
        // This will show you the pixels that are being added to your line in antialiasing.)
        blend.setSourceFunction(SourceFunction.SourceAlpha);
        blend.setDestinationFunction(DestinationFunction.OneMinusSourceAlpha);
        antialiased.setRenderState(blend);

        // Add our antialiased line to the scene.
        _root.attachChild(antialiased);
    }
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        final ZBufferState zb = new ZBufferState();
        zb.setWritable(false);
        _pointSprites.setRenderState(zb);

        final BlendState blend = new BlendState();
        blend.setBlendEnabled(true);
        blend.setEnabled(true);
        blend.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
        blend.setDestinationFunction(BlendState.DestinationFunction.One);
        _pointSprites.setRenderState(blend);

        final FloatBuffer vBuf = BufferUtils.createVector3Buffer(_spriteCount);
        final FloatBuffer cBuf = BufferUtils.createVector4Buffer(_spriteCount);
        final Vector3 position = new Vector3();
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        final Texture texture = TextureManager.load("images/trail.png", Texture.MinificationFilter.Trilinear, false);
        texture.setWrap(WrapMode.EdgeClamp);
        ts.setTexture(texture);
        trailMesh.setRenderState(ts);

        final BlendState bs = new BlendState();
        bs.setBlendEnabled(true);
        bs.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
        bs.setDestinationFunction(BlendState.DestinationFunction.One);
        bs.setTestEnabled(true);
        trailMesh.setRenderState(bs);

        final ZBufferState zs = new ZBufferState();
        zs.setWritable(false);
        trailMesh.setRenderState(zs);
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        ts1.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));

        final TextureState ts2 = new TextureState();
        ts2.setTexture(TextureManager.load("images/flaresmall.jpg", Texture.MinificationFilter.Trilinear, true));

        final BlendState as = new BlendState();
        as.setBlendEnabled(true);
        as.setSourceFunction(BlendState.SourceFunction.DestinationColor);
        as.setDestinationFunction(BlendState.DestinationFunction.SourceColor);

        // Set up our passes
        final PassNodeState pass1 = new PassNodeState();
        pass1.setPassState(ts1);
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        particles.setEndColor(new ColorRGBA(0, 0, 1, 1));
        particles.setEndSize(2.5);

        particles.warmUp(60);

        final BlendState blend = new BlendState();
        blend.setBlendEnabled(true);
        blend.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
        blend.setDestinationFunction(BlendState.DestinationFunction.One);
        particles.setRenderState(blend);

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/flaresmall.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
View Full Code Here

Examples of com.ardor3d.renderer.state.BlendState

        swarm.setMaxSpeed(.2);
        swarm.setSpeedBump(0.025);
        swarm.setTurnSpeed(MathUtils.DEG_TO_RAD * 360);
        particles.addInfluence(swarm);

        final BlendState as1 = new BlendState();
        as1.setBlendEnabled(true);
        as1.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
        as1.setDestinationFunction(BlendState.DestinationFunction.One);
        particles.setRenderState(as1);

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/flaresmall.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
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.