Class KHRToneMapFilter

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

public class KHRToneMapFilter extends Filter
Tone-mapping filter that uses khronos neutral pbr tone mapping curve.
  • Constructor Details

    • KHRToneMapFilter

      public KHRToneMapFilter()
      Creates a tone-mapping filter with the default white-point.
  • 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
    • 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
    • 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.
    • setExposure

      public void setExposure(Vector3f whitePoint)
      Set the exposure for the tone mapping.
    • getExposure

      public Vector3f getExposure()
      Get the exposure for the tone mapping.
      Returns:
      The exposure vector.
    • setGamma

      public void setGamma(Vector3f gamma)
      Set the gamma for the tone mapping.
    • getGamma

      public Vector3f getGamma()
      Get the gamma for the tone mapping.
      Returns:
      The gamma vector.
    • write

      public void write(JmeExporter ex) throws IOException
      Description copied from class: Filter
      Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);
      Specified by:
      write in interface Savable
      Overrides:
      write in class Filter
      Parameters:
      ex - the exporter (not null)
      Throws:
      IOException - from the exporter
    • read

      public void read(JmeImporter im) throws IOException
      Description copied from class: Filter
      Override this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);
      Specified by:
      read in interface Savable
      Overrides:
      read in class Filter
      Throws:
      IOException