public void preFrame(float tpf) { refractionCam.setClipPlane(refractionClipPlane, Plane.Side.Negative);//,-1 }
/** * Sets a clipPlane for this camera. * The cliPlane is used to recompute the projectionMatrix using the plane as the near plane * This technique is known as the oblique near-plane clipping method introduced by Eric Lengyel * more info here * <ul> * <li><a href="http://www.terathon.com/code/oblique.html">http://www.terathon.com/code/oblique.html</a></li> * <li><a href="http://aras-p.info/texts/obliqueortho.html">http://aras-p.info/texts/obliqueortho.html</a></li> * <li><a href="http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html"> * http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html</a></li> * </ul> * * Note that this will work properly only if it's called on each update, and be aware that it won't work properly with the sky bucket. * if you want to handle the sky bucket, look at how it's done in SimpleWaterProcessor.java * @param clipPlane the plane */ public void setClipPlane(Plane clipPlane) { setClipPlane(clipPlane, clipPlane.whichSide(location)); }
public void postQueue(RenderQueue rq) { //we need special treatement for the sky because it must not be clipped rm.getRenderer().setFrameBuffer(reflectionBuffer); reflectionCam.setProjectionMatrix(null); rm.setCamera(reflectionCam, false); rm.getRenderer().clearBuffers(true, true, true); //Rendering the sky whithout clipping rm.getRenderer().setDepthRange(1, 1); vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true); rm.getRenderer().setDepthRange(0, 1); //setting the clip plane to the cam reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1 rm.setCamera(reflectionCam, false); }
public void preFrame(float tpf) { refractionCam.setClipPlane(refractionClipPlane, Plane.Side.Negative);//,-1 }
public void preFrame(float tpf) { refractionCam.setClipPlane(refractionClipPlane, Plane.Side.Negative);//,-1 }
public void preFrame(float tpf) { refractionCam.setClipPlane(refractionClipPlane, Plane.Side.Negative);//,-1 }
/** * Sets a clipPlane for this camera. * The cliPlane is used to recompute the projectionMatrix using the plane as the near plane * This technique is known as the oblique near-plane clipping method introduced by Eric Lengyel * more info here * <ul> * <li><a href="http://www.terathon.com/code/oblique.html">http://www.terathon.com/code/oblique.html</a></li> * <li><a href="http://aras-p.info/texts/obliqueortho.html">http://aras-p.info/texts/obliqueortho.html</a></li> * <li><a href="http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html"> * http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html</a></li> * </ul> * * Note that this will work properly only if it's called on each update, and be aware that it won't work properly with the sky bucket. * if you want to handle the sky bucket, look at how it's done in SimpleWaterProcessor.java * @param clipPlane the plane */ public void setClipPlane(Plane clipPlane) { setClipPlane(clipPlane, clipPlane.whichSide(location)); }
/** * Sets a clipPlane for this camera. * The cliPlane is used to recompute the projectionMatrix using the plane as the near plane * This technique is known as the oblique near-plane clipping method introduced by Eric Lengyel * more info here * <ul> * <li><a href="http://www.terathon.com/code/oblique.html">http://www.terathon.com/code/oblique.html</a></li> * <li><a href="http://aras-p.info/texts/obliqueortho.html">http://aras-p.info/texts/obliqueortho.html</a></li> * <li><a href="http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html"> * http://hacksoflife.blogspot.com/2008/12/every-now-and-then-i-come-across.html</a></li> * </ul> * * Note that this will work properly only if it's called on each update, and be aware that it won't work properly with the sky bucket. * if you want to handle the sky bucket, look at how it's done in SimpleWaterProcessor.java * @param clipPlane the plane */ public void setClipPlane(Plane clipPlane) { setClipPlane(clipPlane, clipPlane.whichSide(location)); }
public void postQueue(RenderQueue rq) { //we need special treatement for the sky because it must not be clipped rm.getRenderer().setFrameBuffer(reflectionBuffer); reflectionCam.setProjectionMatrix(null); rm.setCamera(reflectionCam, false); rm.getRenderer().clearBuffers(true, true, true); //Rendering the sky whithout clipping rm.getRenderer().setDepthRange(1, 1); vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true); rm.getRenderer().setDepthRange(0, 1); //setting the clip plane to the cam reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1 rm.setCamera(reflectionCam, false); }
public void postQueue(RenderQueue rq) { //we need special treatement for the sky because it must not be clipped rm.getRenderer().setFrameBuffer(reflectionBuffer); reflectionCam.setProjectionMatrix(null); rm.setCamera(reflectionCam, false); rm.getRenderer().clearBuffers(true, true, true); //Rendering the sky whithout clipping rm.getRenderer().setDepthRange(1, 1); vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true); rm.getRenderer().setDepthRange(0, 1); //setting the clip plane to the cam reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1 rm.setCamera(reflectionCam, false); }
public void postQueue(RenderQueue rq) { //we need special treatement for the sky because it must not be clipped rm.getRenderer().setFrameBuffer(reflectionBuffer); reflectionCam.setProjectionMatrix(null); rm.setCamera(reflectionCam, false); rm.getRenderer().clearBuffers(true, true, true); //Rendering the sky whithout clipping rm.getRenderer().setDepthRange(1, 1); vp.getQueue().renderQueue(RenderQueue.Bucket.Sky, rm, reflectionCam, true); rm.getRenderer().setDepthRange(0, 1); //setting the clip plane to the cam reflectionCam.setClipPlane(reflectionClipPlane, Plane.Side.Positive);//,1 rm.setCamera(reflectionCam, false); }