public static void getPreNormals(
     RenderManager renderManager, Pass normalPass, ViewPort viewPort) {
   curCount++;
   // do we already have a valid cache to set the framebuffer to?
   Renderer r = renderManager.getRenderer();
   if (cachedPreNormals != null) {
     r.copyFrameBuffer(cachedPreNormals, normalPass.getRenderFrameBuffer(), false);
   } else {
     // lets make the prenormals
     r.setFrameBuffer(normalPass.getRenderFrameBuffer());
     renderManager.getRenderer().clearBuffers(true, true, true);
     if (renderManager.getRenderer().getCaps().contains(Caps.GLSL150)) {
       renderManager.setForcedTechnique("PreNormalPass15");
     } else {
       renderManager.setForcedTechnique("PreNormalPass");
     }
     renderManager.renderViewPortQueues(viewPort, false);
     renderManager.setForcedTechnique(null);
     // if we should cache this, do it now
     if (lastNormalPassesCount > 1) {
       cachedPreNormals = normalPass.getRenderFrameBuffer();
     }
   }
   renderManager.getRenderer().setFrameBuffer(viewPort.getOutputFrameBuffer());
 }
  public void postFrame(FrameBuffer out) {

    FrameBuffer sceneBuffer = renderFrameBuffer;
    if (renderFrameBufferMS != null && !renderer.getCaps().contains(Caps.OpenGL31)) {
      renderer.copyFrameBuffer(renderFrameBufferMS, renderFrameBuffer);
    } else if (renderFrameBufferMS != null) {
      sceneBuffer = renderFrameBufferMS;
    }
    renderFilterChain(renderer, sceneBuffer);
    renderer.setFrameBuffer(outputBuffer);

    // viewport can be null if no filters are enabled
    if (viewPort != null) {
      renderManager.setCamera(viewPort.getCamera(), false);
    }
  }