public class DirectionalLightShadowFilter extends AbstractShadowFilter<DirectionalLightShadowRenderer>
Filter.Pass
shadowRenderer, viewPort
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
DirectionalLightShadowFilter()
Used for serialization.
|
DirectionalLightShadowFilter(AssetManager assetManager,
int shadowMapSize,
int nbSplits)
Creates a DirectionalLightShadowFilter Shadow Filter More info on the
technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
|
Modifier and Type | Method and Description |
---|---|
float |
getLambda()
returns the lambda parameter
|
DirectionalLight |
getLight()
return the light used to cast shadows
|
boolean |
isEnabledStabilization()
returns true if stabilization is enabled
|
void |
read(JmeImporter im)
Override this method if you want to load extra properties when the filter
is loaded else only basic properties of the filter will be loaded
This method should always begin by super.read(im);
|
void |
setEnabledStabilization(boolean stabilize)
Enables the stabilization of the shadow's edges.
|
void |
setLambda(float lambda)
Adjust the repartition of the different shadow maps in the shadow extend
usually goes from 0.0 to 1.0 a low value give a more linear repartition
resulting in a constant quality in the shadow over the extends, but near
shadows could look very jagged a high value give a more logarithmic
repartition resulting in a high quality for near shadows, but the quality
quickly decrease over the extend.
|
void |
setLight(DirectionalLight light)
Sets the light to use to cast shadows
|
void |
write(JmeExporter ex)
Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved
This method should always begin by super.write(ex);
|
cloneFields, getEdgeFilteringMode, getEdgesThickness, getMaterial, getNumShadowMaps, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowMapSize, getShadowMaterial, getShadowZExtend, getShadowZFadeLength, initFilter, isFlushQueues, isRenderBackFacesShadows, isRequiresDepthTexture, jmeClone, postFrame, postQueue, preFrame, setEdgeFilteringMode, setEdgesThickness, setRenderBackFacesShadows, setShadowCompareMode, setShadowIntensity, setShadowZExtend, setShadowZFadeLength
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
public DirectionalLightShadowFilter()
public DirectionalLightShadowFilter(AssetManager assetManager, int shadowMapSize, int nbSplits)
assetManager
- the application asset managershadowMapSize
- the size of the rendered shadowmaps (512,1024,2048,
etc...)nbSplits
- the number of shadow maps rendered (the more shadow maps
the more quality, the less fps).public DirectionalLight getLight()
public void setLight(DirectionalLight light)
light
- a DirectionalLightpublic float getLambda()
setLambda(float lambda)
public void setLambda(float lambda)
lambda
- the lambda value.public boolean isEnabledStabilization()
public void setEnabledStabilization(boolean stabilize)
stabilize
- true to stabilize, false to disable stabilizationpublic void write(JmeExporter ex) throws java.io.IOException
Filter
write
in interface Savable
write
in class AbstractShadowFilter<DirectionalLightShadowRenderer>
ex
- the exporter (not null)java.io.IOException
- from the exporterpublic void read(JmeImporter im) throws java.io.IOException
Filter
read
in interface Savable
read
in class AbstractShadowFilter<DirectionalLightShadowRenderer>
java.io.IOException