Package com.jme3.shadow
Class PssmShadowRenderer
java.lang.Object
com.jme3.shadow.PssmShadowRenderer
- All Implemented Interfaces:
SceneProcessor
Deprecated.
PssmShadow renderer use Parallel Split Shadow Mapping technique (pssm)
It splits the view frustum in several parts and compute a shadow map for each one.
splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map.
This results in a better quality shadow than standard shadow mapping.
for more information on this read http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
It splits the view frustum in several parts and compute a shadow map for each one.
splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map.
This results in a better quality shadow than standard shadow mapping.
for more information on this read http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.static enumDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected AssetManagerDeprecated.protected PssmShadowRenderer.CompareModeDeprecated.protected booleanDeprecated.protected Vector3fDeprecated.protected Picture[]Deprecated.protected Texture2DDeprecated.protected floatDeprecated.protected Vector2fDeprecated.protected floatDeprecated.protected PssmShadowRenderer.FilterModeDeprecated.protected booleanDeprecated.protected floatDeprecated.protected GeometryListDeprecated.protected Matrix4f[]Deprecated.Deprecated.protected intDeprecated.protected booleanDeprecated.protected booleanDeprecated.protected Vector3f[]Deprecated.protected MaterialDeprecated.protected StringDeprecated.protected MaterialDeprecated.protected RenderManagerDeprecated.protected CameraDeprecated.protected FrameBuffer[]Deprecated.protected floatDeprecated.protected Texture2D[]Deprecated.protected floatDeprecated.protected GeometryListDeprecated.protected ColorRGBADeprecated.protected float[]Deprecated.protected ViewPortDeprecated.protected floatDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionPssmShadowRenderer(AssetManager manager, int size, int nbSplits) Deprecated.Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.htmlprotectedPssmShadowRenderer(AssetManager manager, int size, int nbSplits, Material postShadowMat) Deprecated.Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Deprecated.Called when the SP is removed from the RM.voidDeprecated.For debugging purpose Allow to "snapshot" the current frustum to the scenevoidDeprecated.protected voidDeprecated.Deprecated.returns the light direction used by the processorintDeprecated.returns the edges thicknessfloatDeprecated.returns the lambda parameter see #setLambda(float lambda)floatDeprecated.returns the shadow intensityfloatDeprecated.How far the shadows are rendered in the viewfloatDeprecated.get the length over which the shadow will fade out when using a shadowZextendvoidinitialize(RenderManager rm, ViewPort vp) Deprecated.Called in the render thread to initialize the scene processor.booleanDeprecated.returns true if the PssmRenderer flushed the shadow queuesbooleanDeprecated.voidpostFrame(FrameBuffer out) Deprecated.Called after a frame has been rendered and the queue flushed.voidpostQueue(RenderQueue rq) Deprecated.Called after the scene graph has been queued, but before it is flushed.voidpreFrame(float tpf) Deprecated.Called before a framevoidDeprecated.Called when the resolution of the viewport has been changed.final voidsetCompareMode(PssmShadowRenderer.CompareMode compareMode) Deprecated.sets the shadow compare mode seePssmShadowRenderer.CompareModefor more infovoidsetDirection(Vector3f direction) Deprecated.Sets the light direction to use to compute shadowsvoidsetEdgesThickness(int edgesThickness) Deprecated.Sets the shadow edges thickness.final voidsetFilterMode(PssmShadowRenderer.FilterMode filterMode) Deprecated.Sets the filtering mode for shadow edges seePssmShadowRenderer.FilterModefor more infovoidsetFlushQueues(boolean flushQueues) Deprecated.Set this to false if you want to use several PssmRenderers to have multiple shadows cast by multiple light sources.voidsetLambda(float lambda) Deprecated.Adjusts the partition of the shadow extend into shadow maps.protected voidDeprecated.voidsetProfiler(AppProfiler profiler) Deprecated.Sets a profiler Instance for this processor.final voidsetShadowIntensity(float shadowIntensity) Deprecated.Set the shadowIntensity, the value should be between 0 and 1, a 0 value gives a bright and invisible shadow, a 1 value gives a pitch black shadow, default is 0.7voidsetShadowZExtend(float zFar) Deprecated.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.voidsetShadowZFadeLength(float length) Deprecated.Define the length over which the shadow will fade out when using a shadowZextend This is useful to make dynamic shadows fade into baked shadows in the distance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessor
rescale
-
Field Details
-
nbSplits
protected int nbSplitsDeprecated. -
shadowMapSize
protected float shadowMapSizeDeprecated. -
lambda
protected float lambdaDeprecated. -
shadowIntensity
protected float shadowIntensityDeprecated. -
zFarOverride
protected float zFarOverrideDeprecated. -
renderManager
Deprecated. -
viewPort
Deprecated. -
shadowFB
Deprecated. -
shadowMaps
Deprecated. -
dummyTex
Deprecated. -
shadowCam
Deprecated. -
preshadowMat
Deprecated. -
postshadowMat
Deprecated. -
splitOccluders
Deprecated. -
lightViewProjectionsMatrices
Deprecated. -
splits
Deprecated. -
splitsArray
protected float[] splitsArrayDeprecated. -
noOccluders
protected boolean noOccludersDeprecated. -
direction
Deprecated. -
assetManager
Deprecated. -
debug
protected boolean debugDeprecated. -
edgesThickness
protected float edgesThicknessDeprecated. -
filterMode
Deprecated. -
compareMode
Deprecated. -
dispPic
Deprecated. -
points
Deprecated. -
flushQueues
protected boolean flushQueuesDeprecated. -
needsfallBackMaterial
protected boolean needsfallBackMaterialDeprecated. -
postTechniqueName
Deprecated. -
applyHWShadows
protected boolean applyHWShadowsDeprecated. -
applyFilterMode
protected boolean applyFilterModeDeprecated. -
applyPCFEdge
protected boolean applyPCFEdgeDeprecated. -
applyShadowIntensity
protected boolean applyShadowIntensityDeprecated. -
matCache
Deprecated. -
fadeInfo
Deprecated. -
fadeLength
protected float fadeLengthDeprecated. -
applyFadeInfo
protected boolean applyFadeInfoDeprecated. -
lightReceivers
Deprecated.
-
-
Constructor Details
-
PssmShadowRenderer
Deprecated.Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html- Parameters:
manager- the application asset managersize- 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)
-
PssmShadowRenderer
Deprecated.Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html- Parameters:
manager- the application asset managersize- 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).postShadowMat- the material used for post shadows if you need to override it
-
-
Method Details
-
setFilterMode
Deprecated.Sets the filtering mode for shadow edges seePssmShadowRenderer.FilterModefor more info- Parameters:
filterMode- the desired mode (not null)
-
setCompareMode
Deprecated.sets the shadow compare mode seePssmShadowRenderer.CompareModefor more info- Parameters:
compareMode- the desired mode (not null)
-
initialize
Deprecated.Description copied from interface:SceneProcessorCalled in the render thread to initialize the scene processor.- Specified by:
initializein interfaceSceneProcessor- Parameters:
rm- The render manager to which the SP was added tovp- The viewport to which the SP is assigned
-
isInitialized
public boolean isInitialized()Deprecated.- Specified by:
isInitializedin interfaceSceneProcessor- Returns:
- True if initialize() has been called on this SceneProcessor, false if otherwise.
-
getDirection
Deprecated.returns the light direction used by the processor- Returns:
- the pre-existing vector
-
setDirection
Deprecated.Sets the light direction to use to compute shadows- Parameters:
direction- a direction vector (not null, unaffected)
-
postQueue
Deprecated.Description copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
postQueuein interfaceSceneProcessor- Parameters:
rq- The render queue
-
displayFrustum
public void displayFrustum()Deprecated. -
displayShadowMap
Deprecated. -
displayDebug
public void displayDebug()Deprecated.For debugging purpose Allow to "snapshot" the current frustum to the scene -
postFrame
Deprecated.Description copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
postFramein interfaceSceneProcessor- Parameters:
out- The FB to which the scene was rendered.
-
setPostShadowParams
protected void setPostShadowParams()Deprecated. -
preFrame
public void preFrame(float tpf) Deprecated.Description copied from interface:SceneProcessorCalled before a frame- Specified by:
preFramein interfaceSceneProcessor- Parameters:
tpf- Time per frame
-
cleanup
public void cleanup()Deprecated.Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
cleanupin interfaceSceneProcessor
-
reshape
Deprecated.Description copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
reshapein interfaceSceneProcessor- Parameters:
vp- the affected ViewPortw- the new width (in pixels)h- the new height (in pixels)
-
getLambda
public float getLambda()Deprecated.returns the lambda parameter see #setLambda(float lambda)- Returns:
- lambda
-
setLambda
public void setLambda(float lambda) Deprecated.Adjusts the partition of the shadow extend into shadow maps. Lambda is usually between 0 and 1. A low value gives a more linear repartition, resulting in consistent shadow quality over the extend, but near shadows could look very jagged. A high value gives a more logarithmic repartition, resulting in high quality for near shadows, but quality decreases rapidly with distance. The default value is 0.65 (the theoretical optimum).- Parameters:
lambda- the lambda value.
-
getShadowZExtend
public float getShadowZExtend()Deprecated.How far the shadows are rendered in the view- Returns:
- shadowZExtend
- See Also:
-
setShadowZExtend
public void setShadowZExtend(float zFar) Deprecated.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.- Parameters:
zFar- the zFar values that override the computed one
-
getShadowIntensity
public float getShadowIntensity()Deprecated.returns the shadow intensity- Returns:
- shadowIntensity
- See Also:
-
setShadowIntensity
public final void setShadowIntensity(float shadowIntensity) Deprecated.Set the shadowIntensity, the value should be between 0 and 1, a 0 value gives a bright and invisible shadow, a 1 value gives a pitch black shadow, default is 0.7- Parameters:
shadowIntensity- the darkness of the shadow
-
getEdgesThickness
public int getEdgesThickness()Deprecated.returns the edges thickness- Returns:
- edgesThickness
- See Also:
-
setEdgesThickness
public void setEdgesThickness(int edgesThickness) Deprecated.Sets the shadow edges thickness. default is 1, setting it to lower values can help to reduce the jagged effect of the shadow edges- Parameters:
edgesThickness- the desired thickness (in tenths of a pixel, default=10)
-
isFlushQueues
public boolean isFlushQueues()Deprecated.returns true if the PssmRenderer flushed the shadow queues- Returns:
- flushQueues
-
setFlushQueues
public void setFlushQueues(boolean flushQueues) Deprecated.Set this to false if you want to use several PssmRenderers to have multiple shadows cast by multiple light sources. Make sure the last PssmRenderer in the stack DOES flush the queues, but not the others- Parameters:
flushQueues- true to flush the queues, false to avoid flushing them
-
setShadowZFadeLength
public void setShadowZFadeLength(float length) Deprecated.Define the length over which the shadow will fade out when using a shadowZextend This is useful to make dynamic shadows fade into baked shadows in the distance.- Parameters:
length- the fade length in world units
-
setProfiler
Deprecated.Description copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
setProfilerin interfaceSceneProcessor- Parameters:
profiler- the profiler instance.
-
getShadowZFadeLength
public float getShadowZFadeLength()Deprecated.get the length over which the shadow will fade out when using a shadowZextend- Returns:
- the fade length in world units
-
DirectionalLightShadowRenderer