com.jme3.post.filters
Class TranslucentBucketFilter

java.lang.Object
  extended by com.jme3.post.Filter
      extended by com.jme3.post.filters.TranslucentBucketFilter
All Implemented Interfaces:
Savable

public final class TranslucentBucketFilter
extends Filter

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 FilterPostPorcessor


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
TranslucentBucketFilter()
           
TranslucentBucketFilter(boolean enabledSoftParticles)
           
 
Method Summary
protected  void cleanUpFilter(Renderer r)
          override this method if you have some cleanup to do
protected  Material getMaterial()
          Must return the material used for this filter.
protected  void initFilter(AssetManager manager, RenderManager rm, ViewPort vp, int w, int h)
          Initialization of sub classes filters This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization
protected  boolean isRequiresDepthTexture()
          Override this method and return true if your Filter needs the depth texture
protected  boolean isRequiresSceneTexture()
          Override this method and return false if your Filter does not need the scene texture
protected  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 rendering
protected  void setDepthTexture(Texture depthTexture)
          Override if you want to do something special with the depth texture;
 void setEnabled(boolean enabled)
          Enable or disable this filter
 
Methods inherited from class com.jme3.post.Filter
cleanup, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, postQueue, preFrame, read, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TranslucentBucketFilter

public TranslucentBucketFilter()

TranslucentBucketFilter

public TranslucentBucketFilter(boolean enabledSoftParticles)
Method Detail

initFilter

protected void initFilter(AssetManager manager,
                          RenderManager rm,
                          ViewPort vp,
                          int w,
                          int h)
Description copied from class: Filter
Initialization of sub classes filters 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 class Filter
Parameters:
manager - the assetManager
rm - the renderManager
vp - the viewPort where this filter is rendered
w - the width of the filter
h - the height of the filter

setDepthTexture

protected void setDepthTexture(Texture depthTexture)
Description copied from class: Filter
Override if you want to do something special with the depth texture;

Overrides:
setDepthTexture in class Filter

isRequiresSceneTexture

protected boolean isRequiresSceneTexture()
Override this method and return false if your Filter does not need the scene texture

Overrides:
isRequiresSceneTexture in class Filter
Returns:

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 class Filter
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

Overrides:
postFrame in class Filter

cleanUpFilter

protected void cleanUpFilter(Renderer r)
Description copied from class: Filter
override this method if you have some cleanup to do

Overrides:
cleanUpFilter in class Filter
Parameters:
r - the renderer

getMaterial

protected Material getMaterial()
Description copied from class: Filter
Must return the material used for this filter. this method is called every frame.

Specified by:
getMaterial in class Filter
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 class Filter
Parameters:
enabled - true to enable