Class TranslucentBucketFilter

java.lang.Object
com.jme3.post.Filter
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 FilterPostProcessor
  • Constructor Details

    • TranslucentBucketFilter

      public TranslucentBucketFilter()
    • TranslucentBucketFilter

      public TranslucentBucketFilter(boolean enabledSoftParticles)
  • Method Details

    • initFilter

      protected void initFilter(AssetManager manager, RenderManager rm, 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 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
      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 class Filter
      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 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
      Parameters:
      renderManager - for rendering
      viewPort - for rendering
      prevFilterBuffer - the FrameBuffer of the previous filter
      sceneBuffer - the FrameBuffer of the scene
    • 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