com.io7m.r2.core

## Interface R2ShadowDepthVarianceType

- All Superinterfaces:
    R2ShadowType
  All Known Implementing Classes:
    R2ShadowDepthVariance

      public interface R2ShadowDepthVarianceType
      extends R2ShadowType

  The type of depth variance shadows.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default float` | `lightBleedReduction()` The amount of light bleed reduction to apply.
    `R2DepthVarianceBufferDescriptionType` | `mapDescription()`
    `default <A,B,E extends Throwable> B` | `matchShadow(A context, com.io7m.jfunctional.PartialBiFunctionType<A,R2ShadowDepthVarianceType,B,E> on_variance)` Match on the type of light.
    `default float` | `minimumFactor()` The level to which the shadow is allowed to attenuate light.
    `default float` | `minimumVariance()` The the minimum variance value for the shadow.
    `long` | `shadowID()`

- - ### Method Detail

    - #### shadowID

          long shadowID()

      Specified by:
        `shadowID` in interface `R2ShadowType`
      Returns:
        The unique shadow ID

    - #### minimumFactor

          default float minimumFactor()

      Description copied from interface: `R2ShadowType`
      The level to which the shadow is allowed to attenuate light. A value of `n` means that if a point is in shadow, the light intensity will be attenuated down to `n`.
      Specified by:
        `minimumFactor` in interface `R2ShadowType`
      Returns:
        The minimum shadow factor

    - #### mapDescription

          R2DepthVarianceBufferDescriptionType mapDescription()

      Returns:
        The shadow map description

    - #### lightBleedReduction

          default float lightBleedReduction()

      The amount of light bleed reduction to apply.

      This is a scene-dependent value that effectively darkens shadows in order to eliminate "light bleeding" (where light appears to bleed through occluding objects). Setting this value too high results in a loss of detail for shadows.

      Returns:
        The amount of light bleed reduction

    - #### minimumVariance

          default float minimumVariance()

      The the minimum variance value for the shadow.

      The value is used to eliminate biasing issues in shadows. The default value is sufficient for almost all scenes.

      Returns:
        The amount of light bleed reduction

    - #### matchShadow

          default <A,B,E extends Throwable> B matchShadow(A context,
                                                          com.io7m.jfunctional.PartialBiFunctionType<A,R2ShadowDepthVarianceType,B,E> on_variance)
                                                   throws E extends Throwable

      Description copied from interface: `R2ShadowType`
      Match on the type of light.
      Specified by:
        `matchShadow` in interface `R2ShadowType`
      Type Parameters:
        `A` - The type of context values
        `B` - The type of returned values
        `E` - The type of raised exceptions
      Parameters:
        `context` - A context value
        `on_variance` - Evaluated for variance shadows
      Returns:
        A value of type `B`
      Throws:
        `E` - If any of the given functions raise `E`
        `E extends Throwable`

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