@Deprecated public class PssmShadowRenderer extends java.lang.Object implements SceneProcessor
Modifier and Type | Class and Description |
---|---|
static class |
PssmShadowRenderer.CompareMode
Deprecated.
use
CompareMode |
static class |
PssmShadowRenderer.FilterMode
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
applyFadeInfo
Deprecated.
|
protected boolean |
applyFilterMode
Deprecated.
|
protected boolean |
applyHWShadows
Deprecated.
|
protected boolean |
applyPCFEdge
Deprecated.
|
protected boolean |
applyShadowIntensity
Deprecated.
|
protected AssetManager |
assetManager
Deprecated.
|
protected PssmShadowRenderer.CompareMode |
compareMode
Deprecated.
|
protected boolean |
debug
Deprecated.
|
protected Vector3f |
direction
Deprecated.
|
protected Picture[] |
dispPic
Deprecated.
|
protected Texture2D |
dummyTex
Deprecated.
|
protected float |
edgesThickness
Deprecated.
|
protected Vector2f |
fadeInfo
Deprecated.
|
protected float |
fadeLength
Deprecated.
|
protected PssmShadowRenderer.FilterMode |
filterMode
Deprecated.
|
protected boolean |
flushQueues
Deprecated.
|
protected float |
lambda
Deprecated.
|
protected GeometryList |
lightReceivers
Deprecated.
|
protected Matrix4f[] |
lightViewProjectionsMatrices
Deprecated.
|
protected java.util.List<Material> |
matCache
Deprecated.
|
protected int |
nbSplits
Deprecated.
|
protected boolean |
needsfallBackMaterial
Deprecated.
|
protected boolean |
noOccluders
Deprecated.
|
protected Vector3f[] |
points
Deprecated.
|
protected Material |
postshadowMat
Deprecated.
|
protected java.lang.String |
postTechniqueName
Deprecated.
|
protected Material |
preshadowMat
Deprecated.
|
protected RenderManager |
renderManager
Deprecated.
|
protected Camera |
shadowCam
Deprecated.
|
protected FrameBuffer[] |
shadowFB
Deprecated.
|
protected float |
shadowIntensity
Deprecated.
|
protected Texture2D[] |
shadowMaps
Deprecated.
|
protected float |
shadowMapSize
Deprecated.
|
protected GeometryList |
splitOccluders
Deprecated.
|
protected ColorRGBA |
splits
Deprecated.
|
protected float[] |
splitsArray
Deprecated.
|
protected ViewPort |
viewPort
Deprecated.
|
protected float |
zFarOverride
Deprecated.
|
Modifier | Constructor and Description |
---|---|
|
PssmShadowRenderer(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.html
|
protected |
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
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Deprecated.
Called when the SP is removed from the RM.
|
void |
displayDebug()
Deprecated.
For debugging purpose Allow to "snapshot" the current frustum to the
scene
|
void |
displayFrustum()
Deprecated.
|
protected void |
displayShadowMap(Renderer r)
Deprecated.
|
Vector3f |
getDirection()
Deprecated.
returns the light direction used by the processor
|
int |
getEdgesThickness()
Deprecated.
returns the edges thickness
|
float |
getLambda()
Deprecated.
returns the lambda parameter see #setLambda(float lambda)
|
float |
getShadowIntensity()
Deprecated.
returns the shadow intensity
|
float |
getShadowZExtend()
Deprecated.
How far the shadows are rendered in the view
|
float |
getShadowZFadeLength()
Deprecated.
get the length over which the shadow will fade out when using a
shadowZextend
|
void |
initialize(RenderManager rm,
ViewPort vp)
Deprecated.
Called in the render thread to initialize the scene processor.
|
boolean |
isFlushQueues()
Deprecated.
returns true if the PssmRenderer flushed the shadow queues
|
boolean |
isInitialized()
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 frame
|
void |
reshape(ViewPort vp,
int w,
int h)
Deprecated.
Called when the resolution of the viewport has been changed.
|
void |
setCompareMode(PssmShadowRenderer.CompareMode compareMode)
Deprecated.
sets the shadow compare mode see
CompareMode for more info |
void |
setDirection(Vector3f direction)
Deprecated.
Sets the light direction to use to compute shadows
|
void |
setEdgesThickness(int edgesThickness)
Deprecated.
Sets the shadow edges thickness.
|
void |
setFilterMode(PssmShadowRenderer.FilterMode filterMode)
Deprecated.
Sets the filtering mode for shadow edges see
PssmShadowRenderer.FilterMode for more
info |
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.
|
void |
setLambda(float lambda)
Deprecated.
|
protected void |
setPostShadowParams()
Deprecated.
|
void |
setProfiler(AppProfiler profiler)
Deprecated.
Sets a profiler Instance for this processor.
|
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
|
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.
|
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.
|
protected int nbSplits
protected float shadowMapSize
protected float lambda
protected float shadowIntensity
protected float zFarOverride
protected RenderManager renderManager
protected ViewPort viewPort
protected FrameBuffer[] shadowFB
protected Texture2D[] shadowMaps
protected Texture2D dummyTex
protected Camera shadowCam
protected Material preshadowMat
protected Material postshadowMat
protected GeometryList splitOccluders
protected Matrix4f[] lightViewProjectionsMatrices
protected ColorRGBA splits
protected float[] splitsArray
protected boolean noOccluders
protected Vector3f direction
protected AssetManager assetManager
protected boolean debug
protected float edgesThickness
protected PssmShadowRenderer.FilterMode filterMode
protected PssmShadowRenderer.CompareMode compareMode
protected Picture[] dispPic
protected Vector3f[] points
protected boolean flushQueues
protected boolean needsfallBackMaterial
protected java.lang.String postTechniqueName
protected boolean applyHWShadows
protected boolean applyFilterMode
protected boolean applyPCFEdge
protected boolean applyShadowIntensity
protected java.util.List<Material> matCache
protected Vector2f fadeInfo
protected float fadeLength
protected boolean applyFadeInfo
protected GeometryList lightReceivers
public PssmShadowRenderer(AssetManager manager, int size, int nbSplits)
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)protected PssmShadowRenderer(AssetManager manager, int size, int nbSplits, Material postShadowMat)
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 itpublic final void setFilterMode(PssmShadowRenderer.FilterMode filterMode)
PssmShadowRenderer.FilterMode
for more
infofilterMode
- public final void setCompareMode(PssmShadowRenderer.CompareMode compareMode)
CompareMode
for more infocompareMode
- public void initialize(RenderManager rm, ViewPort vp)
SceneProcessor
initialize
in interface SceneProcessor
rm
- The render manager to which the SP was added tovp
- The viewport to which the SP is assignedpublic boolean isInitialized()
isInitialized
in interface SceneProcessor
public Vector3f getDirection()
public void setDirection(Vector3f direction)
direction
- public void postQueue(RenderQueue rq)
SceneProcessor
postQueue
in interface SceneProcessor
rq
- The render queuepublic void displayFrustum()
protected void displayShadowMap(Renderer r)
public void displayDebug()
public void postFrame(FrameBuffer out)
SceneProcessor
postFrame
in interface SceneProcessor
out
- The FB to which the scene was rendered.protected void setPostShadowParams()
public void preFrame(float tpf)
SceneProcessor
preFrame
in interface SceneProcessor
tpf
- Time per framepublic void cleanup()
SceneProcessor
cleanup
in interface SceneProcessor
public void reshape(ViewPort vp, int w, int h)
SceneProcessor
reshape
in interface SceneProcessor
public float getLambda()
public void setLambda(float lambda)
public float getShadowZExtend()
setShadowZExtend(float zFar)
public void setShadowZExtend(float zFar)
zFar
- the zFar values that override the computed onepublic float getShadowIntensity()
setShadowIntensity(float shadowIntensity)
public final void setShadowIntensity(float shadowIntensity)
shadowIntensity
- the darkness of the shadowpublic int getEdgesThickness()
setEdgesThickness(int edgesThickness)
public void setEdgesThickness(int edgesThickness)
edgesThickness
- public boolean isFlushQueues()
public void setFlushQueues(boolean flushQueues)
flushQueues
- public void setShadowZFadeLength(float length)
length
- the fade length in world unitspublic void setProfiler(AppProfiler profiler)
SceneProcessor
setProfiler
in interface SceneProcessor
profiler
- the profiler instance.public float getShadowZFadeLength()