Package com.jme3.post
Class CartoonSSAO
java.lang.Object
com.jme3.post.Filter
com.jme3.post.CartoonSSAO
- All Implemented Interfaces:
Savable
A Cartoon Screen Space Ambient Occlusion filter with instance rendering capabilities.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.post.Filter
Filter.Pass
-
Field Summary
Fields inherited from class com.jme3.post.Filter
defaultPass, enabled, material, postRenderPasses, processor
-
Constructor Summary
ConstructorDescriptionCartoonSSAO
(boolean instancedRendering) Create a Screen Space Ambient Occlusion Filter.CartoonSSAO
(float downsample, boolean instancedRendering) Create a Screen Space Ambient Occlusion Filter.CartoonSSAO
(CartoonSSAO cloneFrom) Create a Screen Space Ambient Occlusion Filter from the given one (by copy). -
Method Summary
Modifier and TypeMethodDescriptionfloat
Get the down sampling value.protected Material
Must return the material used for this filter.protected void
initFilter
(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Initialization of filter subclasses.boolean
Is outline rendering is enabled.protected boolean
Override this method and return true if your Filter needs the depth textureprotected void
postQueue
(RenderQueue renderQueue) Override this method if you want to make a pre pass, before the actual rendering of the framevoid
setDistance
(float dist) Set the distance of the material.void
setDownsampling
(float downsample) Set the down sampling value.void
setOutlineEnabled
(boolean set) Set if outline has to be enabled.Methods inherited from class com.jme3.post.Filter
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, postFrame, preFrame, read, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write
-
Constructor Details
-
CartoonSSAO
public CartoonSSAO(boolean instancedRendering) Create a Screen Space Ambient Occlusion Filter.- Parameters:
instancedRendering
-true
if this filter has to use instance rendering andfalse
(default) otherwise.
-
CartoonSSAO
public CartoonSSAO(float downsample, boolean instancedRendering) Create a Screen Space Ambient Occlusion Filter.- Parameters:
downsample
- factor to divide resolution by for filter, >1 increases speed but degrades quality.instancedRendering
-true
if this filter has to use instance rendering andfalse
(default) otherwise.
-
CartoonSSAO
Create a Screen Space Ambient Occlusion Filter from the given one (by copy).- Parameters:
cloneFrom
- the original filter.
-
-
Method Details
-
isRequiresDepthTexture
protected boolean isRequiresDepthTexture()Description copied from class:Filter
Override this method and return true if your Filter needs the depth texture- Overrides:
isRequiresDepthTexture
in classFilter
- Returns:
- true if your Filter need the depth texture
-
postQueue
Description copied from class:Filter
Override this method if you want to make a pre pass, before the actual rendering of the frame -
setOutlineEnabled
public void setOutlineEnabled(boolean set) Set if outline has to be enabled.- Parameters:
set
-true
if the outline has to be enabled andfalse
otherwise.- See Also:
-
isOutlineEnabled
public boolean isOutlineEnabled()Is outline rendering is enabled.- Returns:
true
if the outline is enabled andfalse
otherwise.- See Also:
-
setDownsampling
public void setDownsampling(float downsample) Set the down sampling value.- Parameters:
downsample
- the down sampling value.- See Also:
-
getDownsampling
public float getDownsampling()Get the down sampling value.- Returns:
- the down sampling value.
- See Also:
-
getMaterial
Description copied from class:Filter
Must return the material used for this filter. this method is called every frame.- Specified by:
getMaterial
in classFilter
- Returns:
- the material used for this filter.
-
setDistance
public void setDistance(float dist) Set the distance of the material.- Parameters:
dist
- the distance of the material.
-
initFilter
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) Description copied from class:Filter
Initialization 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:
initFilter
in classFilter
- Parameters:
manager
- the assetManagerrenderManager
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filter
-