Package com.jme3.post

Class CartoonSSAO

java.lang.Object
com.jme3.post.Filter
com.jme3.post.CartoonSSAO
All Implemented Interfaces:
Savable

public class CartoonSSAO extends Filter
A Cartoon Screen Space Ambient Occlusion filter with instance rendering capabilities.
  • 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 and false (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 and false (default) otherwise.
    • CartoonSSAO

      public CartoonSSAO(CartoonSSAO cloneFrom)
      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 class Filter
      Returns:
      true if your Filter need the depth texture
    • postQueue

      protected void postQueue(RenderQueue renderQueue)
      Description copied from class: Filter
      Override this method if you want to make a pre pass, before the actual rendering of the frame
      Overrides:
      postQueue in class Filter
      Parameters:
      renderQueue - the RenderQueue
    • setOutlineEnabled

      public void setOutlineEnabled(boolean set)
      Set if outline has to be enabled.
      Parameters:
      set - true if the outline has to be enabled and false otherwise.
      See Also:
    • isOutlineEnabled

      public boolean isOutlineEnabled()
      Is outline rendering is enabled.
      Returns:
      true if the outline is enabled and false 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

      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.
    • 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 class Filter
      Parameters:
      manager - the assetManager
      renderManager - the renderManager
      vp - the viewPort where this filter is rendered
      w - the width of the filter
      h - the height of the filter