Package jme3utilities

Class ContrastAdjustmentFilter

java.lang.Object
com.jme3.post.Filter
jme3utilities.ContrastAdjustmentFilter
All Implemented Interfaces:
com.jme3.export.Savable

public class ContrastAdjustmentFilter extends com.jme3.post.Filter
A filter to adjust the contrast of a rendered scene using a power-law function.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.jme3.post.Filter

    com.jme3.post.Filter.Pass
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    asset path of the material definition

    Fields inherited from class com.jme3.post.Filter

    defaultPass, enabled, material, postRenderPasses, processor
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    No-argument constructor needed by SavableClassUtil.
     
    ContrastAdjustmentFilter(float exponent)
    Instantiate a filter with the specified exponent.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Read the filter's power-law exponent.
    protected com.jme3.material.Material
    Access the Material used in this Filter.
    protected void
    initFilter(com.jme3.asset.AssetManager assetManager, com.jme3.renderer.RenderManager renderManager, com.jme3.renderer.ViewPort viewPort, int width, int height)
    Initialize the filter.
    void
    read(com.jme3.export.JmeImporter importer)
    De-serialize this filter, for example when loading from a J3O file.
    final void
    setExponent(float newExponent)
    Alter the filter's power-law exponent.
    void
    write(com.jme3.export.JmeExporter exporter)
    Serialize this filter, for example when saving to a J3O file.

    Methods inherited from class com.jme3.post.Filter

    cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ContrastAdjustmentFilter

      protected ContrastAdjustmentFilter()
      No-argument constructor needed by SavableClassUtil. Do not invoke directly!
    • ContrastAdjustmentFilter

      public ContrastAdjustmentFilter(float exponent)
      Instantiate a filter with the specified exponent.
      Parameters:
      exponent - exponent for the power law (>0)
  • Method Details

    • getExponent

      public float getExponent()
      Read the filter's power-law exponent.
      Returns:
      exponent (>0)
    • setExponent

      public final void setExponent(float newExponent)
      Alter the filter's power-law exponent.
      Parameters:
      newExponent - new value (>0)
    • getMaterial

      protected com.jme3.material.Material getMaterial()
      Access the Material used in this Filter. This method is invoked on every frame.
      Specified by:
      getMaterial in class com.jme3.post.Filter
      Returns:
      the pre-existing instance, or null if the Filter hasn't been initialized
    • initFilter

      protected void initFilter(com.jme3.asset.AssetManager assetManager, com.jme3.renderer.RenderManager renderManager, com.jme3.renderer.ViewPort viewPort, int width, int height)
      Initialize the filter. Invoked when the filter is added to the FilterPostProcessor.
      Specified by:
      initFilter in class com.jme3.post.Filter
      Parameters:
      assetManager - asset manager (not null)
      renderManager - render manager (not null)
      viewPort - view port where the filter will be rendered (not null)
      width - the width of the filter (in pixels, >0)
      height - the height of the filter (in pixels, >0)
    • read

      public void read(com.jme3.export.JmeImporter importer) throws IOException
      De-serialize this filter, for example when loading from a J3O file.
      Specified by:
      read in interface com.jme3.export.Savable
      Overrides:
      read in class com.jme3.post.Filter
      Parameters:
      importer - (not null)
      Throws:
      IOException - from importer
    • write

      public void write(com.jme3.export.JmeExporter exporter) throws IOException
      Serialize this filter, for example when saving to a J3O file.
      Specified by:
      write in interface com.jme3.export.Savable
      Overrides:
      write in class com.jme3.post.Filter
      Parameters:
      exporter - (not null)
      Throws:
      IOException - from exporter