Package com.jme3.shadow
Class PointLightShadowFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.shadow.AbstractShadowFilter<PointLightShadowRenderer>
com.jme3.shadow.PointLightShadowFilter
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
This Filter does basically the same as a PointLightShadowRenderer except it
renders the post shadow pass as a fullscreen quad pass instead of a geometry
pass. It's mostly faster than PointLightShadowRenderer 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 Summary
Nested classes/interfaces inherited from class com.jme3.post.Filter
Filter.Pass
-
Field Summary
Fields inherited from class com.jme3.shadow.AbstractShadowFilter
shadowRenderer, viewPort
Fields inherited from class com.jme3.post.Filter
defaultPass, enabled, material, postRenderPasses, processor
-
Constructor Summary
ModifierConstructorDescriptionprotected
Used for serialization.PointLightShadowFilter
(AssetManager assetManager, int shadowMapSize) Creates a PointLightShadowFilter -
Method Summary
Modifier and TypeMethodDescriptiongetLight()
gets the point light used to cast shadows with this processorvoid
read
(JmeImporter im) 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);void
setLight
(PointLight light) sets the light to use for casting shadows with this processorvoid
write
(JmeExporter ex) 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.shadow.AbstractShadowFilter
cloneFields, getEdgeFilteringMode, getEdgesThickness, getMaterial, getNumShadowMaps, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowMapSize, getShadowMaterial, getShadowZExtend, getShadowZFadeLength, initFilter, isFlushQueues, isRenderBackFacesShadows, isRequiresDepthTexture, jmeClone, postFrame, postQueue, preFrame, setEdgeFilteringMode, setEdgesThickness, setRenderBackFacesShadows, setShadowCompareMode, setShadowIntensity, setShadowZExtend, setShadowZFadeLength
Methods inherited from class com.jme3.post.Filter
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
-
Constructor Details
-
PointLightShadowFilter
protected PointLightShadowFilter()Used for serialization. Use PointLightShadowFilter#PointLightShadowFilter(AssetManager assetManager, int shadowMapSize) instead. -
PointLightShadowFilter
Creates a PointLightShadowFilter- Parameters:
assetManager
- the application asset managershadowMapSize
- the size of the rendered shadowmaps (512,1024,2048, etc...)
-
-
Method Details
-
getLight
gets the point light used to cast shadows with this processor- Returns:
- the point light
-
setLight
sets the light to use for casting shadows with this processor- Parameters:
light
- the point light
-
write
Description copied from class:Filter
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);- Specified by:
write
in interfaceSavable
- Overrides:
write
in classAbstractShadowFilter<PointLightShadowRenderer>
- Parameters:
ex
- the exporter (not null)- Throws:
IOException
- from the exporter
-
read
Description copied from class:Filter
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);- Specified by:
read
in interfaceSavable
- Overrides:
read
in classAbstractShadowFilter<PointLightShadowRenderer>
- Throws:
IOException
-