private void setViewPort(Camera cam) {
        // this will make sure to clearReservations viewport only if needed
        if (cam != prevCam || cam.isViewportChanged()) {
            viewX      = (int) (cam.getViewPortLeft() * cam.getWidth());
            viewY      = (int) (cam.getViewPortBottom() * cam.getHeight());
            int viewX2 = (int) (cam.getViewPortRight() * cam.getWidth());
            int viewY2 = (int) (cam.getViewPortTop() * cam.getHeight());
            viewWidth  = viewX2 - viewX;
            viewHeight = viewY2 - viewY;
            uniformBindingManager.setViewPort(viewX, viewY, viewWidth, viewHeight);
            renderer.setViewPort(viewX, viewY, viewWidth, viewHeight);
            renderer.setClipRect(viewX, viewY, viewWidth, viewHeight);
            cam.clearViewportChanged();
            prevCam = cam;

//            float translateX = viewWidth == viewX ? 0 : -(viewWidth + viewX) / (viewWidth - viewX);
//            float translateY = viewHeight == viewY ? 0 : -(viewHeight + viewY) / (viewHeight - viewY);
//            float scaleX = viewWidth == viewX ? 1f : 2f / (viewWidth - viewX);
//            float scaleY = viewHeight == viewY ? 1f : 2f / (viewHeight - viewY);
//
//            orthoMatrix.loadIdentity();
//            orthoMatrix.setTranslation(translateX, translateY, 0);
//            orthoMatrix.setScale(scaleX, scaleY, 0);

            orthoMatrix.loadIdentity();
            orthoMatrix.setTranslation(-1f, -1f, 0f);
            orthoMatrix.setScale(2f / cam.getWidth(), 2f / cam.getHeight(), 0f);
        }
    }
Renders the {@link Bucket#Translucent translucent queue} on the viewPort.

<p>This call does nothing unless {@link #setHandleTranslucentBucket(boolean) }
is set to true. This method clears the translucent queue after rendering
it.

@param vp The viewport of which the translucent queue should be rendered.

@see #renderViewPortQueues(com.jme3.renderer.ViewPort, boolean)
@see #setHandleTranslucentBucket(boolean)
jme3-core/src/main/java/com/jme3/renderer/RenderManager.java