@Override
    public Texture2D genBRTF() {

        Picture screen = new Picture("BakeScreen", true);
        screen.setWidth(1);
        screen.setHeight(1);

        FrameBuffer brtfbaker = new FrameBuffer(brtf.getImage().getWidth(), brtf.getImage().getHeight(), 1);
        brtfbaker.setSrgb(false);
        brtfbaker.addColorTarget(FrameBufferTarget.newTarget(brtf));

        if (isTexturePulling()) {
            startPulling();
        }

        Camera envcam = updateAndGetInternalCamera(0, brtf.getImage().getWidth(), brtf.getImage().getHeight(), Vector3f.ZERO, 1, 1000);

        Material mat = new Material(assetManager, "Common/IBL/IBLKernels.j3md");
        mat.setBoolean("UseBRDF", true);
        screen.setMaterial(mat);

        renderManager.getRenderer().setFrameBuffer(brtfbaker);
        renderManager.setCamera(envcam, false);

        screen.updateLogicalState(0);
        screen.updateGeometricState();
        renderManager.renderGeometry(screen);

        if (isTexturePulling()) {
            pull(brtfbaker, brtf, 0);
        }

        brtfbaker.dispose();

        if (isTexturePulling()) {
            endPulling(brtf);
        }
        brtf.getImage().clearUpdateNeeded();

        return brtf;
    }
Create a new IBL env baker
@param rm The render manager used to render the env scene
@param am The asset manager used to load the baking shaders
@param format  The format of the color buffers
@param depthFormat The format of the depth buffers
@param env_size The size in pixels of the output environment cube map (eg. 1024)
@param specular_size The size in pixels of the output specular cube map (eg. 1024)
@param irradiance_size The size in pixels of the output irradiance cube map (eg. 512)
@param brtf_size The size in pixels of the output brtf map (eg. 512)
jme3-core/src/main/java/com/jme3/environment/baker/IBLGLEnvBaker.java