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 SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.static enumDeprecated.
- 
Field SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionPssmShadowRenderer(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 SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessorrescale
- 
Field Details- 
nbSplitsprotected int nbSplitsDeprecated.
- 
shadowMapSizeprotected float shadowMapSizeDeprecated.
- 
lambdaprotected float lambdaDeprecated.
- 
shadowIntensityprotected float shadowIntensityDeprecated.
- 
zFarOverrideprotected float zFarOverrideDeprecated.
- 
renderManagerDeprecated.
- 
viewPortDeprecated.
- 
shadowFBDeprecated.
- 
shadowMapsDeprecated.
- 
dummyTexDeprecated.
- 
shadowCamDeprecated.
- 
preshadowMatDeprecated.
- 
postshadowMatDeprecated.
- 
splitOccludersDeprecated.
- 
lightViewProjectionsMatricesDeprecated.
- 
splitsDeprecated.
- 
splitsArrayprotected float[] splitsArrayDeprecated.
- 
noOccludersprotected boolean noOccludersDeprecated.
- 
directionDeprecated.
- 
assetManagerDeprecated.
- 
debugprotected boolean debugDeprecated.
- 
edgesThicknessprotected float edgesThicknessDeprecated.
- 
filterModeDeprecated.
- 
compareModeDeprecated.
- 
dispPicDeprecated.
- 
pointsDeprecated.
- 
flushQueuesprotected boolean flushQueuesDeprecated.
- 
needsfallBackMaterialprotected boolean needsfallBackMaterialDeprecated.
- 
postTechniqueNameDeprecated.
- 
applyHWShadowsprotected boolean applyHWShadowsDeprecated.
- 
applyFilterModeprotected boolean applyFilterModeDeprecated.
- 
applyPCFEdgeprotected boolean applyPCFEdgeDeprecated.
- 
applyShadowIntensityprotected boolean applyShadowIntensityDeprecated.
- 
matCacheDeprecated.
- 
fadeInfoDeprecated.
- 
fadeLengthprotected float fadeLengthDeprecated.
- 
applyFadeInfoprotected boolean applyFadeInfoDeprecated.
- 
lightReceiversDeprecated.
 
- 
- 
Constructor Details- 
PssmShadowRendererDeprecated.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 manager
- size- 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)
 
- 
PssmShadowRendererDeprecated.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 manager
- size- 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- 
setFilterModeDeprecated.Sets the filtering mode for shadow edges seePssmShadowRenderer.FilterModefor more info- Parameters:
- filterMode- the desired mode (not null)
 
- 
setCompareModeDeprecated.sets the shadow compare mode seePssmShadowRenderer.CompareModefor more info- Parameters:
- compareMode- the desired mode (not null)
 
- 
initializeDeprecated.Description copied from interface:SceneProcessorCalled in the render thread to initialize the scene processor.- Specified by:
- initializein interface- SceneProcessor
- Parameters:
- rm- The render manager to which the SP was added to
- vp- The viewport to which the SP is assigned
 
- 
isInitializedpublic boolean isInitialized()Deprecated.- Specified by:
- isInitializedin interface- SceneProcessor
- Returns:
- True if initialize() has been called on this SceneProcessor, false if otherwise.
 
- 
getDirectionDeprecated.returns the light direction used by the processor- Returns:
- the pre-existing vector
 
- 
setDirectionDeprecated.Sets the light direction to use to compute shadows- Parameters:
- direction- a direction vector (not null, unaffected)
 
- 
postQueueDeprecated.Description copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
- postQueuein interface- SceneProcessor
- Parameters:
- rq- The render queue
 
- 
displayFrustumpublic void displayFrustum()Deprecated.
- 
displayShadowMapDeprecated.
- 
displayDebugpublic void displayDebug()Deprecated.For debugging purpose Allow to "snapshot" the current frustum to the scene
- 
postFrameDeprecated.Description copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
- postFramein interface- SceneProcessor
- Parameters:
- out- The FB to which the scene was rendered.
 
- 
setPostShadowParamsprotected void setPostShadowParams()Deprecated.
- 
preFramepublic void preFrame(float tpf) Deprecated.Description copied from interface:SceneProcessorCalled before a frame- Specified by:
- preFramein interface- SceneProcessor
- Parameters:
- tpf- Time per frame
 
- 
cleanuppublic void cleanup()Deprecated.Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
- cleanupin interface- SceneProcessor
 
- 
reshapeDeprecated.Description copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
- reshapein interface- SceneProcessor
- Parameters:
- vp- the affected ViewPort
- w- the new width (in pixels)
- h- the new height (in pixels)
 
- 
getLambdapublic float getLambda()Deprecated.returns the lambda parameter see #setLambda(float lambda)- Returns:
- lambda
 
- 
setLambdapublic 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.
 
- 
getShadowZExtendpublic float getShadowZExtend()Deprecated.How far the shadows are rendered in the view- Returns:
- shadowZExtend
- See Also:
 
- 
setShadowZExtendpublic 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
 
- 
getShadowIntensitypublic float getShadowIntensity()Deprecated.returns the shadow intensity- Returns:
- shadowIntensity
- See Also:
 
- 
setShadowIntensitypublic 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
 
- 
getEdgesThicknesspublic int getEdgesThickness()Deprecated.returns the edges thickness- Returns:
- edgesThickness
- See Also:
 
- 
setEdgesThicknesspublic 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)
 
- 
isFlushQueuespublic boolean isFlushQueues()Deprecated.returns true if the PssmRenderer flushed the shadow queues- Returns:
- flushQueues
 
- 
setFlushQueuespublic 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
 
- 
setShadowZFadeLengthpublic 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
 
- 
setProfilerDeprecated.Description copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
- setProfilerin interface- SceneProcessor
- Parameters:
- profiler- the profiler instance.
 
- 
getShadowZFadeLengthpublic 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