@Override
    public void preFrame(float tpf) {
        if (filters.isEmpty() || lastFilterIndex == -1) {
            //If the camera is initialized and there are no filter to render, the camera viewport is restored as it was
            if (cameraInit) {
                viewPort.getCamera().resize(originalWidth, originalHeight, true);
                viewPort.getCamera().setViewPort(left, right, bottom, top);
                viewPort.setOutputFrameBuffer(outputBuffer);
                cameraInit = false;
            }

        } else {
           setupViewPortFrameBuffer();
           //if we are in a multiview situation we need to resize the camera
           //to the viewport size so that the back buffer is rendered correctly
           if (multiView) {
                viewPort.getCamera().resize(width, height, false);
                viewPort.getCamera().setViewPort(0, 1, 0, 1);
                viewPort.getCamera().update();
                renderManager.setCamera(viewPort.getCamera(), false);
           }
        }

        for (Filter filter : filters.getArray()) {
            if (filter.isEnabled()) {
                if (prof != null) prof.spStep(SpStep.ProcPreFrame, FPP, filter.getName());
                filter.preFrame(tpf);
            }
        }

    }
iterate through the filter list and renders filters
@param r
@param sceneFb
jme3-core/src/main/java/com/jme3/post/FilterPostProcessor.java