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 DirectionalLight shadow filter.
|
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)
Adjusts the partition of the shadow extend into shadow maps.
|
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, 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,
etcetera)nbSplits
- the number of shadow maps rendered (More shadow maps yield
better quality, fewer fps.)public DirectionalLightShadowFilterVR(AssetManager assetManager, int shadowMapSize, int nbSplits, java.lang.String useMatDef)
assetManager
- the application's asset managershadowMapSize
- the size of the rendered shadowmaps (512, 1024, 2048, etc...)nbSplits
- the number of shadow maps rendered (More shadow maps yield
better quality, fewer 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 loss of shadow quality in 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>
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 AbstractShadowFilterVR<DirectionalLightShadowRendererVR>
java.io.IOException