public class DirectionalLightShadowFilterVR extends AbstractShadowFilterVR<DirectionalLightShadowRendererVR>
Filter.Pass
shadowRenderer, viewPort
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
DirectionalLightShadowFilterVR(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
|
DirectionalLightShadowFilterVR(AssetManager assetManager,
int shadowMapSize,
int nbSplits,
java.lang.String useMatDef)
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()
Check 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);
|
getEdgeFilteringMode, getEdgesThickness, getMaterial, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowMaterial, getShadowZExtend, getShadowZFadeLength, initFilter, isFlushQueues, isRenderBackFacesShadows, isRequiresDepthTexture, postFrame, postQueue, preFrame, setEdgeFilteringMode, setEdgesThickness, setFlushQueues, 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 DirectionalLightShadowFilterVR(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 DirectionalLightShadowFilterVR(AssetManager assetManager, int shadowMapSize, int nbSplits, java.lang.String useMatDef)
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).useMatDef
- the material to attach to this filter.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()
true
if the stabilization is enabled and false
otherwise.setEnabledStabilization(boolean)
public void setEnabledStabilization(boolean stabilize)
true
)
This prevents shadow edges from flickering when the camera moves.
However it can lead to some shadow quality loss in some particular scenes.stabilize
- true
if the stabilization has to be enabled and false
otherwise.isEnabledStabilization()
public void write(JmeExporter ex) throws java.io.IOException
Filter
write
in interface Savable
write
in class AbstractShadowFilterVR<DirectionalLightShadowRendererVR>
java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
Filter
read
in interface Savable
read
in class AbstractShadowFilterVR<DirectionalLightShadowRendererVR>
java.io.IOException