DisplayRange

A tone mapper that converts the input HDR RGB color into one of 16 debug colors that represent the pixel's exposure.

When the output is cyan, the input color represents middle gray (18% exposure). Every exposure stop above or below middle gray causes a color shift.

The relationship between exposures and colors is:

  • -5EV black

  • -4EV darkest blue

  • -3EV darker blue

  • -2EV dark blue

  • -1EV blue

  • 0EV cyan

  • +1EV dark green

  • +2EV green

  • +3EV yellow

  • +4EV yellow-orange

  • +5EV orange

  • +6EV bright red

  • +7EV red

  • +8EV magenta

  • +9EV purple

  • +10EV white

This tone mapper is useful to validate and tweak scene lighting.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

True if this tone mapper produces LDR output, i.e. never outputs values above 1.0.

Link copied to clipboard

If true, then this function holds that f(x) = vec3(f(x.r), f(x.g), f(x.b)), which lets Filament build its LUT faster.

Functions

Link copied to clipboard
open override fun close()

Destroys the native tone mapper. ColorGrading.Builder only uses it during build(), so it can be closed afterwards.

Link copied to clipboard
operator fun invoke(color: FloatArray, out: FloatArray? = null): FloatArray

Maps an open domain (or "scene referred") color value to a display domain (or "display referred") color value. Both are in the Rec.2020 color space, with no transfer function applied ("linear Rec.2020").