com.io7m.r2.core.shaders.provided

## Class R2SurfaceShaderBasicParameters

- java.lang.Object
- - com.io7m.r2.core.shaders.provided.R2SurfaceShaderBasicParameters

- All Implemented Interfaces:
    R2SurfaceShaderBasicParametersType, R2SurfaceShaderBasicParametersValuesType

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

  Parameters for the basic surface shader.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType>` | `albedoColor()` The base albedo color for the surface.
    `float` | `albedoMix()` A specification of the mix value between the albedo color and texture.
    `R2Texture2DUsableType` | `albedoTexture()` An albedo map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.albedoColor()`.
    `float` | `alphaDiscardThreshold()` The alpha discard threshold specifies a lower bound on the opacity of surface pixels.
    `static R2SurfaceShaderBasicParameters.Builder` | `builder()` Creates a builder for `R2SurfaceShaderBasicParameters`.
    `static R2SurfaceShaderBasicParameters` | `copyOf(R2SurfaceShaderBasicParametersType instance)` Creates an immutable copy of a `R2SurfaceShaderBasicParametersType` value.
    `float` | `emission()` The emission value for the surface, in the range `[0.0, 1.0]`.
    `R2Texture2DUsableType` | `emissionTexture()` An emission map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.emission()`.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `R2SurfaceShaderBasicParameters` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `textureDefaults`, `albedoColor`, `specularColor`, `emission`, `emissionTexture`, `albedoTexture`, `albedoMix`, `specularTexture`, `specularExponent`, `normalTexture`, `alphaDiscardThreshold`.
    `R2Texture2DUsableType` | `normalTexture()` A normal map used to peturb normal vectors for the surface.
    `static R2SurfaceShaderBasicParameters` | `of(R2TextureDefaultsType textureDefaults, com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor, com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> specularColor, float emission, R2Texture2DUsableType emissionTexture, R2Texture2DUsableType albedoTexture, float albedoMix, R2Texture2DUsableType specularTexture, float specularExponent, R2Texture2DUsableType normalTexture, float alphaDiscardThreshold)` Construct a new immutable `R2SurfaceShaderBasicParameters` instance.
    `com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType>` | `specularColor()` The base specular color for the surface.
    `float` | `specularExponent()` The specular exponent.
    `R2Texture2DUsableType` | `specularTexture()` A specular map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.specularColor()`.
    `R2TextureDefaultsType` | `textureDefaults()`
    `String` | `toString()` Prints the immutable value `R2SurfaceShaderBasicParameters` with attribute values.
    `R2SurfaceShaderBasicParameters` | `withAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> value)` Copy the current immutable object by setting a value for the `albedoColor` attribute.
    `R2SurfaceShaderBasicParameters` | `withAlbedoMix(float value)` Copy the current immutable object by setting a value for the `albedoMix` attribute.
    `R2SurfaceShaderBasicParameters` | `withAlbedoTexture(R2Texture2DUsableType value)` Copy the current immutable object by setting a value for the `albedoTexture` attribute.
    `R2SurfaceShaderBasicParameters` | `withAlphaDiscardThreshold(float value)` Copy the current immutable object by setting a value for the `alphaDiscardThreshold` attribute.
    `R2SurfaceShaderBasicParameters` | `withEmission(float value)` Copy the current immutable object by setting a value for the `emission` attribute.
    `R2SurfaceShaderBasicParameters` | `withEmissionTexture(R2Texture2DUsableType value)` Copy the current immutable object by setting a value for the `emissionTexture` attribute.
    `R2SurfaceShaderBasicParameters` | `withNormalTexture(R2Texture2DUsableType value)` Copy the current immutable object by setting a value for the `normalTexture` attribute.
    `R2SurfaceShaderBasicParameters` | `withSpecularColor(com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> value)` Copy the current immutable object by setting a value for the `specularColor` attribute.
    `R2SurfaceShaderBasicParameters` | `withSpecularExponent(float value)` Copy the current immutable object by setting a value for the `specularExponent` attribute.
    `R2SurfaceShaderBasicParameters` | `withSpecularTexture(R2Texture2DUsableType value)` Copy the current immutable object by setting a value for the `specularTexture` attribute.
    `R2SurfaceShaderBasicParameters` | `withTextureDefaults(R2TextureDefaultsType value)` Copy the current immutable object by setting a value for the `textureDefaults` attribute.

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

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

- - ### Method Detail

    - #### textureDefaults

          public R2TextureDefaultsType textureDefaults()

      Specified by:
        `textureDefaults` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `textureDefaults` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `textureDefaults` attribute

    - #### albedoColor

          public com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      The base albedo color for the surface. This value is mixed with values sampled from `R2SurfaceShaderBasicParametersValuesType.albedoTexture()` based on `R2SurfaceShaderBasicParametersValuesType.albedoMix()`.

      Specified by:
        `albedoColor` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `albedoColor` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `albedoColor` attribute
      See Also:
        `R2SurfaceShaderBasicParametersValuesType.albedoTexture()`, `R2SurfaceShaderBasicParametersValuesType.albedoMix()`

    - #### specularColor

          public com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> specularColor()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      The base specular color for the surface. This essentially encodes both the intensity and color of specular highlights for the surface.

      Specified by:
        `specularColor` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `specularColor` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `specularColor` attribute

    - #### emission

          public float emission()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      The emission value for the surface, in the range `[0.0, 1.0]`. The value is typically processed by filters to give surfaces the appearance of emitting light.

      Specified by:
        `emission` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `emission` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `emission` attribute

    - #### emissionTexture

          public R2Texture2DUsableType emissionTexture()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      An emission map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.emission()`. Specifically, values sampled from the map are multiplied by `R2SurfaceShaderBasicParametersValuesType.emission()` to give per-pixel control of the emission value.

      Specified by:
        `emissionTexture` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `emissionTexture` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `emissionTexture` attribute

    - #### albedoTexture

          public R2Texture2DUsableType albedoTexture()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      An albedo map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.albedoColor()`. Specifically, values sampled from the map are linearly mixed with `R2SurfaceShaderBasicParametersValuesType.albedoColor()` based on `R2SurfaceShaderBasicParametersValuesType.albedoMix()`. The alpha channel of the map is also used so that a texture with transparent sections will show the underlying `R2SurfaceShaderBasicParametersValuesType.albedoColor()` even when the texture is fully mixed (i.e. `R2SurfaceShaderBasicParametersValuesType.albedoMix()` == `1.0`).

      Specified by:
        `albedoTexture` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `albedoTexture` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `albedoTexture` attribute

    - #### albedoMix

          public float albedoMix()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      A specification of the mix value between the albedo color and texture. If `0.0`, the albedo of the surface will be `R2SurfaceShaderBasicParametersValuesType.albedoColor()`. If `1.0`, the albedo of the surface will be a value sampled from `R2SurfaceShaderBasicParametersValuesType.albedoTexture()`. Other values in the range `[0.0, 1.0]` will linearly mix between the two extremes.

      Specified by:
        `albedoMix` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `albedoMix` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `albedoMix` attribute

    - #### specularTexture

          public R2Texture2DUsableType specularTexture()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      A specular map which is used to modulate the value of `R2SurfaceShaderBasicParametersValuesType.specularColor()`. Specifically, values sampled from the map are multiplied by `R2SurfaceShaderBasicParametersValuesType.specularColor()` to give per-pixel control of specular intensity and color.

      Specified by:
        `specularTexture` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `specularTexture` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `specularTexture` attribute

    - #### specularExponent

          public float specularExponent()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      The specular exponent. This is a value in the range `[0.0, 256.0]` and is used directly as the exponent term.

      Specified by:
        `specularExponent` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `specularExponent` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `specularExponent` attribute

    - #### normalTexture

          public R2Texture2DUsableType normalTexture()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      A normal map used to peturb normal vectors for the surface. The texture is expected to contain RGB-encoded vectors such that `[0.5, 0.5, 1.0]` represents the "neutral" tangent-space `[0.0, 0.0, 1.0]` vector.

      A map containing entirely `[0.5, 0.5, 1.0]` values will have no visible effect on the surface.

      Specified by:
        `normalTexture` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `normalTexture` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `normalTexture` attribute

    - #### alphaDiscardThreshold

          public float alphaDiscardThreshold()

      Description copied from interface: `R2SurfaceShaderBasicParametersValuesType`

      The alpha discard threshold specifies a lower bound on the opacity of surface pixels. For any given surface pixel, if the opacity of the calculated albedo is less than the `R2SurfaceShaderBasicParametersValuesType.alphaDiscardThreshold()`, then the pixel is simply discarded; the pixel is not written to the current geometry buffer. This allows for otherwise opaque surfaces to have fully transparent sections.

      Specified by:
        `alphaDiscardThreshold` in interface `R2SurfaceShaderBasicParametersType`
      Specified by:
        `alphaDiscardThreshold` in interface `R2SurfaceShaderBasicParametersValuesType`
      Returns:
        The value of the `alphaDiscardThreshold` attribute

    - #### withTextureDefaults

          public final R2SurfaceShaderBasicParameters withTextureDefaults(R2TextureDefaultsType value)

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

    - #### withAlbedoColor

          public final R2SurfaceShaderBasicParameters withAlbedoColor(com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> value)

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

    - #### withSpecularColor

          public final R2SurfaceShaderBasicParameters withSpecularColor(com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> value)

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

    - #### withEmission

          public final R2SurfaceShaderBasicParameters withEmission(float value)

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

    - #### withEmissionTexture

          public final R2SurfaceShaderBasicParameters withEmissionTexture(R2Texture2DUsableType value)

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

    - #### withAlbedoTexture

          public final R2SurfaceShaderBasicParameters withAlbedoTexture(R2Texture2DUsableType value)

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

    - #### withAlbedoMix

          public final R2SurfaceShaderBasicParameters withAlbedoMix(float value)

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

    - #### withSpecularTexture

          public final R2SurfaceShaderBasicParameters withSpecularTexture(R2Texture2DUsableType value)

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

    - #### withSpecularExponent

          public final R2SurfaceShaderBasicParameters withSpecularExponent(float value)

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

    - #### withNormalTexture

          public final R2SurfaceShaderBasicParameters withNormalTexture(R2Texture2DUsableType value)

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

    - #### withAlphaDiscardThreshold

          public final R2SurfaceShaderBasicParameters withAlphaDiscardThreshold(float value)

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

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `R2SurfaceShaderBasicParameters` 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: `textureDefaults`, `albedoColor`, `specularColor`, `emission`, `emissionTexture`, `albedoTexture`, `albedoMix`, `specularTexture`, `specularExponent`, `normalTexture`, `alphaDiscardThreshold`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static R2SurfaceShaderBasicParameters of(R2TextureDefaultsType textureDefaults,
                                                          com.io7m.jtensors.parameterized.PVectorI4F<R2SpaceRGBAType> albedoColor,
                                                          com.io7m.jtensors.parameterized.PVectorI3F<R2SpaceRGBType> specularColor,
                                                          float emission,
                                                          R2Texture2DUsableType emissionTexture,
                                                          R2Texture2DUsableType albedoTexture,
                                                          float albedoMix,
                                                          R2Texture2DUsableType specularTexture,
                                                          float specularExponent,
                                                          R2Texture2DUsableType normalTexture,
                                                          float alphaDiscardThreshold)

      Construct a new immutable `R2SurfaceShaderBasicParameters` instance.
      Parameters:
        `textureDefaults` - The value for the `textureDefaults` attribute
        `albedoColor` - The value for the `albedoColor` attribute
        `specularColor` - The value for the `specularColor` attribute
        `emission` - The value for the `emission` attribute
        `emissionTexture` - The value for the `emissionTexture` attribute
        `albedoTexture` - The value for the `albedoTexture` attribute
        `albedoMix` - The value for the `albedoMix` attribute
        `specularTexture` - The value for the `specularTexture` attribute
        `specularExponent` - The value for the `specularExponent` attribute
        `normalTexture` - The value for the `normalTexture` attribute
        `alphaDiscardThreshold` - The value for the `alphaDiscardThreshold` attribute
      Returns:
        An immutable R2SurfaceShaderBasicParameters instance

    - #### copyOf

          public static R2SurfaceShaderBasicParameters copyOf(R2SurfaceShaderBasicParametersType instance)

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

    - #### builder

          public static R2SurfaceShaderBasicParameters.Builder builder()

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

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