@Override
    public void reshape(ViewPort vp, int w, int h) {
        // You can use multiple channel formats as well. That's why red is using RGBA8 as an example.
        Texture2D redTexture = new Texture2D(w, h, Format.RGBA8);        // color texture
        Texture2D greenTexture = new Texture2D(w, h, Format.Luminance8); // monochrome texture
        Texture2D blueTexture = new Texture2D(w, h, Format.Luminance8);  // monochrome texture
        Texture2D rgbTexture = new Texture2D(w, h, Format.RGBA8);        // color texture

        fb = new FrameBuffer(w, h, 1);
        fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(redTexture));   // location 0
        fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(greenTexture)); // location 1
        fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(blueTexture));  // location 2
        fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(rgbTexture));   // location 3
        fb.setMultiTarget(true);

        display1.setTexture(assetManager, rgbTexture, false);
        display2.setTexture(assetManager, redTexture, false);
        display3.setTexture(assetManager, greenTexture, false);
        display4.setTexture(assetManager, blueTexture, false);

        display1.setPosition(0, 0); // lower-left quadrant
        display1.setWidth(w / 2f);
        display1.setHeight(h / 2f);

        display2.setPosition(0, h / 2f); // upper-left quadrant
        display2.setWidth(w / 2f);
        display2.setHeight(h / 2f);

        display3.setPosition(w / 2f, h / 2f); // upper-right quadrant
        display3.setWidth(w / 2f);
        display3.setHeight(h / 2f);

        display4.setPosition(w / 2f, 0f); // lower-right quadrant
        display4.setWidth(w / 2f);
        display4.setHeight(h / 2f);

        guiNode.updateGeometricState();
        initialized = true;
    }
Create a cube with the specified color,
using a custom unshaded material that outputs 4 textures:<ul>
<li>red channel only to location 0,</li>
<li>green channel only to location 1,</li>
<li>blue channel only to location 2,</li>
<li>merged RGB to location 3.</li></ul>

@param color the desired albedo color (alias created)
@return a new Geometry with no parent
jme3-examples/src/main/java/jme3test/post/TestMultiRenderTarget.java