/** * Create a DirectionalLightShadowRenderer More info on the technique at <a * href="https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html">https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html</a> * * @param assetManager the application asset manager * @param shadowMapSize the size of the rendered shadowmaps (512,1024,2048, * etc...) * @param nbSplits the number of shadow maps rendered (the more shadow maps * the more quality, the less fps). */ public DirectionalLightShadowRenderer(AssetManager assetManager, int shadowMapSize, int nbSplits) { super(assetManager, shadowMapSize, nbSplits); init(nbSplits, shadowMapSize); }
@Override public void cloneFields(final Cloner cloner, final Object original) { light = cloner.clone(light); init(nbShadowMaps, (int) shadowMapSize); super.cloneFields(cloner, original); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); lambda = ic.readFloat("lambda", 0.65f); zFarOverride = ic.readFloat("zFarOverride", 0); light = (DirectionalLight) ic.readSavable("light", null); fadeInfo = (Vector2f) ic.readSavable("fadeInfo", null); fadeLength = ic.readFloat("fadeLength", 0f); init(nbShadowMaps, (int) shadowMapSize); }
/** * Create a DirectionalLightShadowRenderer More info on the technique at <a * href="https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html">https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html</a> * * @param assetManager the application asset manager * @param shadowMapSize the size of the rendered shadowmaps (512,1024,2048, * etc...) * @param nbSplits the number of shadow maps rendered (the more shadow maps * the more quality, the less fps). */ public DirectionalLightShadowRenderer(AssetManager assetManager, int shadowMapSize, int nbSplits) { super(assetManager, shadowMapSize, nbSplits); init(nbSplits, shadowMapSize); }
@Override public void cloneFields(final Cloner cloner, final Object original) { light = cloner.clone(light); init(nbShadowMaps, (int) shadowMapSize); super.cloneFields(cloner, original); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); lambda = ic.readFloat("lambda", 0.65f); zFarOverride = ic.readInt("zFarOverride", 0); light = (DirectionalLight) ic.readSavable("light", null); fadeInfo = (Vector2f) ic.readSavable("fadeInfo", null); fadeLength = ic.readFloat("fadeLength", 0f); init(nbShadowMaps, (int) shadowMapSize); }