Package com.jme3.shadow
Class PssmShadowFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.shadow.PssmShadowFilter
- All Implemented Interfaces:
- Savable
Deprecated.
This Filter does basically the same as a PssmShadowRenderer except it renders 
 the post shadow pass as a fullscreen quad pass instead of a geometry pass.
 It's mostly faster than PssmShadowRenderer as long as you have more than about ten shadow receiving objects.
 The expense is the drawback that the shadow Receive mode set on spatial is ignored.
 So basically all and only objects that render depth in the scene receive shadows.
 See this post for more details http://jmonkeyengine.org/groups/general-2/forum/topic/silly-question-about-shadow-rendering/#post-191599
 
 API is basically the same as the PssmShadowRenderer;
- 
Nested Class SummaryNested classes/interfaces inherited from class com.jme3.post.FilterFilter.Pass
- 
Field SummaryFields inherited from class com.jme3.post.FilterdefaultPass, enabled, material, postRenderPasses, processor
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDeprecated.Used for serialization.PssmShadowFilter(AssetManager manager, int size, int nbSplits) Deprecated.Creates a PSSM shadow filter.
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.returns the light direction used by the processorintDeprecated.returns the edges thicknessfloatDeprecated.returns the lambda parameterprotected MaterialDeprecated.Must return the material used for this filter.floatDeprecated.returns the shadow intensityDeprecated.floatDeprecated.How far the shadows are rendered in the viewfloatDeprecated.get the length over which the shadow will fade out when using a shadowZextendprotected voidinitFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Deprecated.Initialization of filter subclasses.booleanDeprecated.returns true if the PssmRenderer flushed the shadow queuesprotected booleanDeprecated.Override this method and return true if your Filter needs the depth textureprotected voidpostFrame(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) Deprecated.Override this method if you want to make a pass just after the frame has been rendered and just before the filter renderingprotected voidpostQueue(RenderQueue queue) Deprecated.Override this method if you want to make a pre pass, before the actual rendering of the frameprotected voidpreFrame(float tpf) Deprecated.Override this method if you want to modify parameters according to tpf before the rendering of the frame.voidread(JmeImporter im) Deprecated.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);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.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 shadowZextendvoidwrite(JmeExporter ex) Deprecated.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);Methods inherited from class com.jme3.post.Filtercleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
- 
Constructor Details- 
PssmShadowFilterprotected PssmShadowFilter()Deprecated.Used for serialization. Use PssmShadowFilter#PssmShadowFilter(AssetManager assetManager, int size, int nbSplits) instead.
- 
PssmShadowFilterDeprecated.Creates a PSSM shadow filter. More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html- Parameters:
- manager- the application's asset manager
- size- the size of the rendered shadowmaps (512, 1024, 2048, etcetera)
- nbSplits- the number of shadow maps rendered (More shadow maps mean better quality, fewer frames per second.)
 
 
- 
- 
Method Details- 
getMaterialDeprecated.Description copied from class:FilterMust return the material used for this filter. this method is called every frame.- Specified by:
- getMaterialin class- Filter
- Returns:
- the material used for this filter.
 
- 
isRequiresDepthTextureprotected boolean isRequiresDepthTexture()Deprecated.Description copied from class:FilterOverride this method and return true if your Filter needs the depth texture- Overrides:
- isRequiresDepthTexturein class- Filter
- Returns:
- true if your Filter need the depth texture
 
- 
getShadowMaterialDeprecated.
- 
preFrameprotected void preFrame(float tpf) Deprecated.Description copied from class:FilterOverride this method if you want to modify parameters according to tpf before the rendering of the frame. This is useful for animated filters Also it can be the place to render pre passes
- 
postQueueDeprecated.Description copied from class:FilterOverride this method if you want to make a pre pass, before the actual rendering of the frame
- 
postFrameprotected void postFrame(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) Deprecated.Description copied from class:FilterOverride this method if you want to make a pass just after the frame has been rendered and just before the filter rendering
- 
initFilterprotected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Deprecated.Description copied from class:FilterInitialization of filter subclasses. This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization- Specified by:
- initFilterin class- Filter
- Parameters:
- manager- the assetManager
- renderManager- the renderManager
- vp- the viewPort where this filter is rendered
- w- the width of the filter
- h- the height of the filter
 
- 
getDirectionDeprecated.returns the light direction used by the processor- Returns:
- a direction vector
 
- 
setDirectionDeprecated.Sets the light direction to use to compute shadows- Parameters:
- direction- a direction vector (not null, unaffected)
 
- 
getLambdapublic float getLambda()Deprecated.returns the lambda parameter- Returns:
- lambda
- See Also:
 
- 
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 partition, resulting in consistent shadow quality over the extend, but near shadows could look very jagged. A high value gives a more logarithmic partition, 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
 
- 
setCompareModeDeprecated.sets the shadow compare mode seePssmShadowRenderer.CompareModefor more info- Parameters:
- compareMode- the desired mode (not null)
 
- 
setFilterModeDeprecated.Sets the filtering mode for shadow edges seePssmShadowRenderer.FilterModefor more info- Parameters:
- filterMode- the desired mode (not null)
 
- 
setShadowZFadeLengthpublic void setShadowZFadeLength(float length) Deprecated.Define the length over which the shadow will fade out when using a shadowZextend- Parameters:
- length- the fade length in world units
 
- 
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
 
- 
writeDeprecated.Description copied from class:FilterOverride 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);- Specified by:
- writein interface- Savable
- Overrides:
- writein class- Filter
- Parameters:
- ex- the exporter (not null)
- Throws:
- IOException- from the exporter
 
- 
readDeprecated.Description copied from class:FilterOverride 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);- Specified by:
- readin interface- Savable
- Overrides:
- readin class- Filter
- Throws:
- IOException
 
 
- 
DirectionalLightShadowFilter