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
Modifier and TypeClassDescriptionstatic enum
Deprecated.static enum
Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Deprecated.protected boolean
Deprecated.protected boolean
Deprecated.protected boolean
Deprecated.protected boolean
Deprecated.protected AssetManager
Deprecated.protected PssmShadowRenderer.CompareMode
Deprecated.protected boolean
Deprecated.protected Vector3f
Deprecated.protected Picture[]
Deprecated.protected Texture2D
Deprecated.protected float
Deprecated.protected Vector2f
Deprecated.protected float
Deprecated.protected PssmShadowRenderer.FilterMode
Deprecated.protected boolean
Deprecated.protected float
Deprecated.protected GeometryList
Deprecated.protected Matrix4f[]
Deprecated.Deprecated.protected int
Deprecated.protected boolean
Deprecated.protected boolean
Deprecated.protected Vector3f[]
Deprecated.protected Material
Deprecated.protected String
Deprecated.protected Material
Deprecated.protected RenderManager
Deprecated.protected Camera
Deprecated.protected FrameBuffer[]
Deprecated.protected float
Deprecated.protected Texture2D[]
Deprecated.protected float
Deprecated.protected GeometryList
Deprecated.protected ColorRGBA
Deprecated.protected float[]
Deprecated.protected ViewPort
Deprecated.protected float
Deprecated. -
Constructor Summary
ModifierConstructorDescriptionPssmShadowRenderer
(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.htmlprotected
PssmShadowRenderer
(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 TypeMethodDescriptionvoid
cleanup()
Deprecated.Called when the SP is removed from the RM.void
Deprecated.For debugging purpose Allow to "snapshot" the current frustum to the scenevoid
Deprecated.protected void
Deprecated.Deprecated.returns the light direction used by the processorint
Deprecated.returns the edges thicknessfloat
Deprecated.returns the lambda parameter see #setLambda(float lambda)float
Deprecated.returns the shadow intensityfloat
Deprecated.How far the shadows are rendered in the viewfloat
Deprecated.get the length over which the shadow will fade out when using a shadowZextendvoid
initialize
(RenderManager rm, ViewPort vp) Deprecated.Called in the render thread to initialize the scene processor.boolean
Deprecated.returns true if the PssmRenderer flushed the shadow queuesboolean
Deprecated.void
postFrame
(FrameBuffer out) Deprecated.Called after a frame has been rendered and the queue flushed.void
postQueue
(RenderQueue rq) Deprecated.Called after the scene graph has been queued, but before it is flushed.void
preFrame
(float tpf) Deprecated.Called before a framevoid
Deprecated.Called when the resolution of the viewport has been changed.final void
setCompareMode
(PssmShadowRenderer.CompareMode compareMode) Deprecated.sets the shadow compare mode seePssmShadowRenderer.CompareMode
for more infovoid
setDirection
(Vector3f direction) Deprecated.Sets the light direction to use to compute shadowsvoid
setEdgesThickness
(int edgesThickness) Deprecated.Sets the shadow edges thickness.final void
setFilterMode
(PssmShadowRenderer.FilterMode filterMode) Deprecated.Sets the filtering mode for shadow edges seePssmShadowRenderer.FilterMode
for more infovoid
setFlushQueues
(boolean flushQueues) Deprecated.Set this to false if you want to use several PssmRenderers to have multiple shadows cast by multiple light sources.void
setLambda
(float lambda) Deprecated.Adjusts the partition of the shadow extend into shadow maps.protected void
Deprecated.void
setProfiler
(AppProfiler profiler) Deprecated.Sets a profiler Instance for this processor.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.7void
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.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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.FilterMode
for more info- Parameters:
filterMode
- the desired mode (not null)
-
setCompareMode
Deprecated.sets the shadow compare mode seePssmShadowRenderer.CompareMode
for more info- Parameters:
compareMode
- the desired mode (not null)
-
initialize
Deprecated.Description copied from interface:SceneProcessor
Called in the render thread to initialize the scene processor.- Specified by:
initialize
in 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:
isInitialized
in 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:SceneProcessor
Called after the scene graph has been queued, but before it is flushed.- Specified by:
postQueue
in 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:SceneProcessor
Called after a frame has been rendered and the queue flushed.- Specified by:
postFrame
in 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:SceneProcessor
Called before a frame- Specified by:
preFrame
in interfaceSceneProcessor
- Parameters:
tpf
- Time per frame
-
cleanup
public void cleanup()Deprecated.Description copied from interface:SceneProcessor
Called when the SP is removed from the RM.- Specified by:
cleanup
in interfaceSceneProcessor
-
reshape
Deprecated.Description copied from interface:SceneProcessor
Called when the resolution of the viewport has been changed.- Specified by:
reshape
in 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:SceneProcessor
Sets a profiler Instance for this processor.- Specified by:
setProfiler
in 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