/** * Initialize this shadow renderer prior to its first update. * * @param rm the render manager * @param vp the viewport */ public void initialize(RenderManager rm, ViewPort vp) { renderManager = rm; viewPort = vp; postTechniqueName = "PostShadow"; if(zFarOverride>0 && frustumCam == null){ initFrustumCam(); } }
/** * Set the distance from the eye where the shadows will be rendered default * value is dynamically computed to the shadow casters/receivers union bound * zFar, capped to view frustum far value. * * @param zFar the zFar values that override the computed one */ public void setShadowZExtend(float zFar) { this.zFarOverride = zFar; if(zFarOverride == 0){ fadeInfo = null; frustumCam = null; }else{ if (fadeInfo != null) { fadeInfo.set(zFarOverride - fadeLength, 1f / fadeLength); } if(frustumCam == null && viewPort != null){ initFrustumCam(); } } }