Package com.jme3.post.filters
Class TranslucentBucketFilter
java.lang.Object
com.jme3.post.Filter
com.jme3.post.filters.TranslucentBucketFilter
- All Implemented Interfaces:
Savable
A filter to handle translucent objects when rendering a scene with filters that uses depth like WaterFilter and SSAOFilter
just create a TranslucentBucketFilter and add it to the Filter list of a FilterPostProcessor
-
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
override this method if you have some cleanup to doprotected Material
Must return the material used for this filter.protected void
initFilter
(AssetManager manager, RenderManager rm, ViewPort vp, int w, int h) Initialization of filter subclasses.protected boolean
Override this method and return true if your Filter needs the depth textureprotected boolean
Override this method and return true if your Filter needs the scene textureprotected void
postFrame
(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) Override this method if you want to make a pass just after the frame has been rendered and just before the filter renderingprotected void
setDepthTexture
(Texture depthTexture) Override if you want to do something special with the depth texture;void
setEnabled
(boolean enabled) Enable or disable this filterMethods inherited from class com.jme3.post.Filter
cleanup, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, postFilter, postQueue, preFrame, read, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write
-
Constructor Details
-
TranslucentBucketFilter
public TranslucentBucketFilter() -
TranslucentBucketFilter
public TranslucentBucketFilter(boolean enabledSoftParticles)
-
-
Method Details
-
initFilter
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 assetManagerrm
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filter
-
setDepthTexture
Description copied from class:Filter
Override if you want to do something special with the depth texture;- Overrides:
setDepthTexture
in classFilter
- Parameters:
depthTexture
- the desired Texture
-
isRequiresSceneTexture
protected boolean isRequiresSceneTexture()Override this method and return true if your Filter needs the scene texture- Overrides:
isRequiresSceneTexture
in classFilter
- Returns:
- false
-
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
-
postFrame
protected void postFrame(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) Description copied from class:Filter
Override this method if you want to make a pass just after the frame has been rendered and just before the filter rendering -
cleanUpFilter
Description copied from class:Filter
override this method if you have some cleanup to do- Overrides:
cleanUpFilter
in classFilter
- Parameters:
r
- the renderer
-
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.
-
setEnabled
public void setEnabled(boolean enabled) Description copied from class:Filter
Enable or disable this filter- Overrides:
setEnabled
in classFilter
- Parameters:
enabled
- true to enable
-