Back to Filament

Generic

docs/android/dokka/filament-android/com.google.android.filament/-tone-mapper/-generic/index.md

1.75.03.7 KB
Original Source

//filament-android/com.google.android.filament/ToneMapper/Generic

Generic

[main]
open class Generic : ToneMapper

Generic tone mapping operator that gives control over the tone mapping curve. This operator can be used to control the aesthetics of the final image. This operator also allows to control the dynamic range of the scene referred values. The tone mapping curve is defined by 5 parameters:

  • contrast: controls the contrast of the curve
  • referred values map to output white
  • midGrayIn: sets the input middle gray
  • midGrayOut: sets the output middle gray
  • hdrMax: defines the maximum input value that will be mapped to output white

Constructors

Generic[main]
constructor()
Builds a new generic tone mapper parameterized to closely approximate the ACESLegacy tone mapper.
constructor(contrast: Float, midGrayIn: Float, midGrayOut: Float, hdrMax: Float)
Builds a new generic tone mapper.

Functions

NameSummary
getContrast[main]
open fun getContrast(): Float
Returns the contrast of the curve as a strictly positive value.
getHdrMax[main]
open fun getHdrMax(): Float
Returns the maximum input value that will map to output white, as a value >= 1.0.
getMidGrayIn[main]
open fun getMidGrayIn(): Float
Returns the middle gray point for input values as a value between 0.0 and 1.0.
getMidGrayOut[main]
open fun getMidGrayOut(): Float
Returns the middle gray point for output values as a value between 0.0 and 1.0.
getNativeObject[main]
open fun getNativeObject(): Long
setContrast[main]
open fun setContrast(contrast: Float)
Sets the contrast of the curve, must be >0.0, values in the range 0.5..2.0 are recommended.
setHdrMax[main]
open fun setHdrMax(hdrMax: Float)
Defines the maximum input value that will be mapped to output white.
setMidGrayIn[main]
open fun setMidGrayIn(midGrayIn: Float)
Sets the input middle gray, between 0.0 and 1.0.
setMidGrayOut[main]
open fun setMidGrayOut(midGrayOut: Float)
Sets the output middle gray, between 0.0 and 1.0.