com.io7m.r2.filters

## Class R2FilterFXAAParameters

- java.lang.Object
- - com.io7m.r2.filters.R2FilterFXAAParameters

- All Implemented Interfaces:
    R2FilterFXAAParametersType

      @Generated(value={"Immutables.generator","R2FilterFXAAParametersType"})
      public final class R2FilterFXAAParameters
      extends Object
      implements R2FilterFXAAParametersType

  The type of parameters for filters that apply anti-aliasing using the FXAA algorithm.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `R2FilterFXAAParameters.Builder` Builds instances of type `R2FilterFXAAParameters`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static R2FilterFXAAParameters.Builder` | `builder()` Creates a builder for `R2FilterFXAAParameters`.
    `static R2FilterFXAAParameters` | `copyOf(R2FilterFXAAParametersType instance)` Creates an immutable copy of a `R2FilterFXAAParametersType` value.
    `float` | `edgeThreshold()` The minimum amount of local contrast required to apply the algorithm.
    `float` | `edgeThresholdMinimum()` The minimum edge brightness for which to enable filtering.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2FilterFXAAParameters` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `texture`, `quality`, `subPixelAliasingRemoval`, `edgeThreshold`, `edgeThresholdMinimum`.
    `static R2FilterFXAAParameters` | `of(R2Texture2DUsableType texture, R2FilterFXAAQuality quality, float subPixelAliasingRemoval, float edgeThreshold, float edgeThresholdMinimum)` Construct a new immutable `R2FilterFXAAParameters` instance.
    `R2FilterFXAAQuality` | `quality()`
    `float` | `subPixelAliasingRemoval()` The amount of subpixel aliasing removal.
    `R2Texture2DUsableType` | `texture()`
    `String` | `toString()` Prints the immutable value `R2FilterFXAAParameters` with attribute values.
    `R2FilterFXAAParameters` | `withEdgeThreshold(float value)` Copy the current immutable object by setting a value for the `edgeThreshold` attribute.
    `R2FilterFXAAParameters` | `withEdgeThresholdMinimum(float value)` Copy the current immutable object by setting a value for the `edgeThresholdMinimum` attribute.
    `R2FilterFXAAParameters` | `withQuality(R2FilterFXAAQuality value)` Copy the current immutable object by setting a value for the `quality` attribute.
    `R2FilterFXAAParameters` | `withSubPixelAliasingRemoval(float value)` Copy the current immutable object by setting a value for the `subPixelAliasingRemoval` attribute.
    `R2FilterFXAAParameters` | `withTexture(R2Texture2DUsableType value)` Copy the current immutable object by setting a value for the `texture` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### texture

          public R2Texture2DUsableType texture()

      Specified by:
        `texture` in interface `R2FilterFXAAParametersType`
      Returns:
        The texture that will be filtered

    - #### quality

          public R2FilterFXAAQuality quality()

      Specified by:
        `quality` in interface `R2FilterFXAAParametersType`
      Returns:
        The FXAA quality preset

    - #### subPixelAliasingRemoval

          public float subPixelAliasingRemoval()

      The amount of subpixel aliasing removal.

      The range of useful values is `[0.0, 1.0]`, where `0.0` turns off filtering and `1.0` gives almost excessive filtering.

      Specified by:
        `subPixelAliasingRemoval` in interface `R2FilterFXAAParametersType`
      Returns:
        The subpixel aliasing removal amount

    - #### edgeThreshold

          public float edgeThreshold()

      The minimum amount of local contrast required to apply the algorithm.

      The range of useful values is `[0.063, 0.333]`, where `0.333` is fastest but lowest quality, and `0.063` is overkill quality and is relatively slow.

      Specified by:
        `edgeThreshold` in interface `R2FilterFXAAParametersType`
      Returns:
        The edge threshold

    - #### edgeThresholdMinimum

          public float edgeThresholdMinimum()

      The minimum edge brightness for which to enable filtering.

      The range of useful values is `[0.0312, 0.0833]`, where `0.0312` is slowest, and `0.0833` is fastest.

      This value is somewhat scene-specific, but the default (and highest) value appears to work well. The documentation for the FXAA algorithm suggests looking at mostly-green rendered content (the algorithm depends on luma information taken from the green channel of the filtered image), setting this value at `0.0`, and then increasing it until aliasing artifacts appear.

      Specified by:
        `edgeThresholdMinimum` in interface `R2FilterFXAAParametersType`
      Returns:
        The edge threshold minimum

    - #### withTexture

          public final R2FilterFXAAParameters withTexture(R2Texture2DUsableType value)

      Copy the current immutable object by setting a value for the `texture` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for texture
      Returns:
        A modified copy of the `this` object

    - #### withQuality

          public final R2FilterFXAAParameters withQuality(R2FilterFXAAQuality value)

      Copy the current immutable object by setting a value for the `quality` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for quality
      Returns:
        A modified copy of the `this` object

    - #### withSubPixelAliasingRemoval

          public final R2FilterFXAAParameters withSubPixelAliasingRemoval(float value)

      Copy the current immutable object by setting a value for the `subPixelAliasingRemoval` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for subPixelAliasingRemoval
      Returns:
        A modified copy of the `this` object

    - #### withEdgeThreshold

          public final R2FilterFXAAParameters withEdgeThreshold(float value)

      Copy the current immutable object by setting a value for the `edgeThreshold` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for edgeThreshold
      Returns:
        A modified copy of the `this` object

    - #### withEdgeThresholdMinimum

          public final R2FilterFXAAParameters withEdgeThresholdMinimum(float value)

      Copy the current immutable object by setting a value for the `edgeThresholdMinimum` attribute. A value strict bits equality used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for edgeThresholdMinimum
      Returns:
        A modified copy of the `this` object

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2FilterFXAAParameters` that have equal attribute values.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `texture`, `quality`, `subPixelAliasingRemoval`, `edgeThreshold`, `edgeThresholdMinimum`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `R2FilterFXAAParameters` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static R2FilterFXAAParameters of(R2Texture2DUsableType texture,
                                                  R2FilterFXAAQuality quality,
                                                  float subPixelAliasingRemoval,
                                                  float edgeThreshold,
                                                  float edgeThresholdMinimum)

      Construct a new immutable `R2FilterFXAAParameters` instance.
      Parameters:
        `texture` - The value for the `texture` attribute
        `quality` - The value for the `quality` attribute
        `subPixelAliasingRemoval` - The value for the `subPixelAliasingRemoval` attribute
        `edgeThreshold` - The value for the `edgeThreshold` attribute
        `edgeThresholdMinimum` - The value for the `edgeThresholdMinimum` attribute
      Returns:
        An immutable R2FilterFXAAParameters instance

    - #### copyOf

          public static R2FilterFXAAParameters copyOf(R2FilterFXAAParametersType instance)

      Creates an immutable copy of a `R2FilterFXAAParametersType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
        `instance` - The instance to copy
      Returns:
        A copied immutable R2FilterFXAAParameters instance

    - #### builder

          public static R2FilterFXAAParameters.Builder builder()

      Creates a builder for `R2FilterFXAAParameters`.
      Returns:
        A new R2FilterFXAAParameters builder

Copyright © 2017 <code@io7m.com> http://io7m.com