com.io7m.r2.filters

## Class R2ShaderFilterFXAAParameters

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

- All Implemented Interfaces:
    R2ShaderFilterFXAAParametersType

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

  Parameters for the FXAA shader.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static R2ShaderFilterFXAAParameters.Builder` | `builder()` Creates a builder for `R2ShaderFilterFXAAParameters`.
    `static R2ShaderFilterFXAAParameters` | `copyOf(R2ShaderFilterFXAAParametersType instance)` Creates an immutable copy of a `R2ShaderFilterFXAAParametersType` 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 `R2ShaderFilterFXAAParameters` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `texture`, `subPixelAliasingRemoval`, `edgeThreshold`, `edgeThresholdMinimum`.
    `static R2ShaderFilterFXAAParameters` | `of(R2Texture2DUsableType texture, float subPixelAliasingRemoval, float edgeThreshold, float edgeThresholdMinimum)` Construct a new immutable `R2ShaderFilterFXAAParameters` instance.
    `float` | `subPixelAliasingRemoval()` The amount of subpixel aliasing removal.
    `R2Texture2DUsableType` | `texture()`
    `String` | `toString()` Prints the immutable value `R2ShaderFilterFXAAParameters` with attribute values.
    `R2ShaderFilterFXAAParameters` | `withEdgeThreshold(float value)` Copy the current immutable object by setting a value for the `edgeThreshold` attribute.
    `R2ShaderFilterFXAAParameters` | `withEdgeThresholdMinimum(float value)` Copy the current immutable object by setting a value for the `edgeThresholdMinimum` attribute.
    `R2ShaderFilterFXAAParameters` | `withSubPixelAliasingRemoval(float value)` Copy the current immutable object by setting a value for the `subPixelAliasingRemoval` attribute.
    `R2ShaderFilterFXAAParameters` | `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 `R2ShaderFilterFXAAParametersType`
      Returns:
        The texture that will be filtered

    - #### 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 `R2ShaderFilterFXAAParametersType`
      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 `R2ShaderFilterFXAAParametersType`
      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 `R2ShaderFilterFXAAParametersType`
      Returns:
        The edge threshold minimum

    - #### withTexture

          public final R2ShaderFilterFXAAParameters 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

    - #### withSubPixelAliasingRemoval

          public final R2ShaderFilterFXAAParameters 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 R2ShaderFilterFXAAParameters 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 R2ShaderFilterFXAAParameters 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 `R2ShaderFilterFXAAParameters` 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`, `subPixelAliasingRemoval`, `edgeThreshold`, `edgeThresholdMinimum`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static R2ShaderFilterFXAAParameters of(R2Texture2DUsableType texture,
                                                        float subPixelAliasingRemoval,
                                                        float edgeThreshold,
                                                        float edgeThresholdMinimum)

      Construct a new immutable `R2ShaderFilterFXAAParameters` instance.
      Parameters:
        `texture` - The value for the `texture` 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 R2ShaderFilterFXAAParameters instance

    - #### copyOf

          public static R2ShaderFilterFXAAParameters copyOf(R2ShaderFilterFXAAParametersType instance)

      Creates an immutable copy of a `R2ShaderFilterFXAAParametersType` 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 R2ShaderFilterFXAAParameters instance

    - #### builder

          public static R2ShaderFilterFXAAParameters.Builder builder()

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

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