Package com.ardor3d.renderer.effect

Examples of com.ardor3d.renderer.effect.EffectStep_SetRenderTarget


    }

    @Override
    public void prepare(final EffectManager manager) {
        _steps.clear();
        _steps.add(new EffectStep_SetRenderTarget("*Next"));

        final EffectStep_RenderScreenOverlay colorizeStep = new EffectStep_RenderScreenOverlay();
        colorizeStep.getTextureState().setTexture(_colorRampTexture, 1);
        colorizeStep.getTargetMap().put("*Previous", 0);
        colorizeStep.getEnforcedStates().put(StateType.GLSLShader, getColorizeShader());
View Full Code Here


        _steps.clear();
        // step 1: pick whether we are blooming the whole previous render buffer or just specific items
        if (useBloomItems) {
            // render these items to a texture
            _steps.add(new EffectStep_SetRenderTarget(RT_MAIN));
            _steps.add(new EffectStep_RenderSpatials(null));
        }

        // step 2: extract intensity
        {
            _steps.add(new EffectStep_SetRenderTarget(RT_SECONDARY));
            final EffectStep_RenderScreenOverlay extract = new EffectStep_RenderScreenOverlay();
            extract.getEnforcedStates().put(StateType.GLSLShader, _extractionShader);
            extract.getTargetMap().put(useBloomItems ? RT_MAIN : "*Previous", 0);
            _steps.add(extract);
        }

        // step 3: blur
        {
            _steps.add(new EffectStep_SetRenderTarget(RT_MAIN));
            final EffectStep_RenderScreenOverlay blurHoriz = new EffectStep_RenderScreenOverlay();
            blurHoriz.getEnforcedStates().put(StateType.GLSLShader, _blurHorizShader);
            blurHoriz.getTargetMap().put(RT_SECONDARY, 0);
            _steps.add(blurHoriz);

            _steps.add(new EffectStep_SetRenderTarget(RT_SECONDARY));
            final EffectStep_RenderScreenOverlay blurVert = new EffectStep_RenderScreenOverlay();
            blurVert.getEnforcedStates().put(StateType.GLSLShader, _blurVertShader);
            blurVert.getTargetMap().put(RT_MAIN, 0);
            _steps.add(blurVert);
        }

        // finally: draw bloom texture and previous texture on fsq, blended.
        _steps.add(new EffectStep_SetRenderTarget("*Next"));

        final EffectStep_RenderScreenOverlay blendOverlay = new EffectStep_RenderScreenOverlay();
        blendOverlay.getEnforcedStates().put(StateType.GLSLShader, getBlendShader());
        blendOverlay.getTargetMap().put("*Previous", 0);
        blendOverlay.getTargetMap().put(RT_SECONDARY, 1);
View Full Code Here

        _steps.clear();

        // step 1: downsample previous rendering in chain
        {
            _steps.add(new EffectStep_SetRenderTarget(RT_DOWNSAMPLED));
            final EffectStep_RenderScreenOverlay downsample = new EffectStep_RenderScreenOverlay();
            downsample.getTargetMap().put("*Previous", 0);
            _steps.add(downsample);
        }

        // step 2: extract our average luminance value
        {
            _steps.add(new EffectStep_SetRenderTarget(RT_LUM64x64));
            final EffectStep_RenderScreenOverlay extract64 = new EffectStep_RenderScreenOverlay();
            extract64.getEnforcedStates().put(StateType.GLSLShader, getLuminanceExtractionShader());
            extract64.getTargetMap().put(RT_DOWNSAMPLED, 0);
            _steps.add(extract64);

            _steps.add(new EffectStep_SetRenderTarget(RT_LUM16x16));
            final EffectStep_RenderScreenOverlay extract4 = new EffectStep_RenderScreenOverlay();
            extract4.getTargetMap().put(RT_LUM64x64, 0);
            _steps.add(extract4);

            _steps.add(new EffectStep_SetRenderTarget(RT_LUM1x1));
            final EffectStep_RenderScreenOverlay extract1 = new EffectStep_RenderScreenOverlay();
            extract1.getTargetMap().put(RT_LUM16x16, 0);
            _steps.add(extract1);
        }

        // step 3: apply bright pass, extracting the brighter than normal portions of the scene
        {
            _steps.add(new EffectStep_SetRenderTarget(RT_BRIGHTMAP));
            final EffectStep_RenderScreenOverlay bright = new EffectStep_RenderScreenOverlay();
            bright.getEnforcedStates().put(StateType.GLSLShader, getBrightMapShader());
            bright.getTargetMap().put(RT_DOWNSAMPLED, 0);
            bright.getTargetMap().put(RT_LUM1x1, 1);
            _steps.add(bright);
        }

        // finally: draw bloom texture and previous texture on fsq, blended.
        _steps.add(new EffectStep_SetRenderTarget("*Next"));

        final EffectStep_RenderScreenOverlay blendOverlay = new EffectStep_RenderScreenOverlay();
        blendOverlay.getTargetMap().put(RT_BRIGHTMAP, 0);
        _steps.add(blendOverlay);

View Full Code Here

TOP

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

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.