Class SmaaWeightsFilter

java.lang.Object
gaiasky.render.postprocess.filters.Filter<SmaaWeightsFilter>
gaiasky.render.postprocess.filters.SmaaWeightsFilter
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public final class SmaaWeightsFilter extends Filter<SmaaWeightsFilter>
SMAA blending weights pass. Searches the edge buffer for the ends of each detected edge and looks up the area covered by each side of the edge in the precomputed area texture. The SMAA algorithm is by Jorge Jimenez et al.; see assets/shader/postprocess/smaa-LICENSE.md.
  • Constructor Details

    • SmaaWeightsFilter

      public SmaaWeightsFilter(float viewportWidth, float viewportHeight, com.badlogic.gdx.graphics.Texture areaTexture, com.badlogic.gdx.graphics.Texture searchTexture, String defines)
      Parameters:
      viewportWidth - The viewport width in pixels.
      viewportHeight - The viewport height in pixels.
      areaTexture - The 160x560 SMAA area lookup table.
      searchTexture - The 64x16 SMAA search lookup table.
      defines - Shader defines, used to select the preset.
  • Method Details

    • setViewportSize

      public void setViewportSize(float width, float height)
    • setLookupTextures

      public void setLookupTextures(com.badlogic.gdx.graphics.Texture areaTexture, com.badlogic.gdx.graphics.Texture searchTexture)
    • rebind

      public void rebind()
      Specified by:
      rebind in class Filter<SmaaWeightsFilter>
    • onBeforeRender

      protected void onBeforeRender()
      Description copied from class: Filter
      This method will get called just before a rendering operation occurs.
      Specified by:
      onBeforeRender in class Filter<SmaaWeightsFilter>