Package com.ardor3d.renderer.effect

Examples of com.ardor3d.renderer.effect.RenderTarget_Texture2D


    protected void initTargets(final EffectManager manager) {
        final DisplaySettings canvas = manager.getCanvasSettings();
        final int downsampledHeight = Math.round(canvas.getHeight() * _downsampleRatio);
        final int downsampledWidth = Math.round(canvas.getWidth() * _downsampleRatio);

        final RenderTarget_Texture2D main = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight, manager
                .getOutputFormat());
        main.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_MAIN, main);

        final RenderTarget_Texture2D secondary = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
                manager.getOutputFormat());
        secondary.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_SECONDARY, secondary);
    }
View Full Code Here


    private void initTargets(final EffectManager manager) {
        final DisplaySettings canvas = manager.getCanvasSettings();
        final int downsampledHeight = Math.round(canvas.getHeight() * _downsampleRatio);
        final int downsampledWidth = Math.round(canvas.getWidth() * _downsampleRatio);

        final RenderTarget_Texture2D downsampled = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
                TextureStoreFormat.RGBA16F);
        downsampled.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_DOWNSAMPLED, downsampled);

        manager.getRenderTargetMap().put(RT_LUM64x64, getLuminanceDownsampleTexture(64));
        manager.getRenderTargetMap().put(RT_LUM16x16, getLuminanceDownsampleTexture(16));
        manager.getRenderTargetMap().put(RT_LUM1x1, getLuminanceDownsampleTexture(1));

        final RenderTarget_Texture2D brightmap = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
                TextureStoreFormat.RGBA16F);
        brightmap.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_BRIGHTMAP, brightmap);

        final RenderTarget_Texture2D bloomHoriz = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
                TextureStoreFormat.RGBA8);
        bloomHoriz.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_BLOOM_HORIZONTAL, bloomHoriz);

        final RenderTarget_Texture2D bloom = new RenderTarget_Texture2D(downsampledWidth, downsampledHeight,
                TextureStoreFormat.RGBA8);
        bloom.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_BLOOM, bloom);
    }
View Full Code Here

        bloom.getTexture().setWrap(WrapMode.Clamp);
        manager.getRenderTargetMap().put(RT_BLOOM, bloom);
    }

    private RenderTarget getLuminanceDownsampleTexture(final int size) {
        final RenderTarget_Texture2D target = new RenderTarget_Texture2D(size, size, TextureStoreFormat.RGBA16F);
        if (size != 1) {
            target.getTexture().setMinificationFilter(MinificationFilter.Trilinear);
            target.getTexture().setMagnificationFilter(MagnificationFilter.Bilinear);
        } else {
            target.getTexture().setMinificationFilter(MinificationFilter.NearestNeighborNoMipMaps);
            target.getTexture().setMagnificationFilter(MagnificationFilter.NearestNeighbor);
        }

        target.getTexture().setWrap(WrapMode.Clamp);
        return target;
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.renderer.effect.RenderTarget_Texture2D

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.