Package com.google.android.filament
Class ToneMapper.Generic
- java.lang.Object
-
- com.google.android.filament.ToneMapper
-
- com.google.android.filament.ToneMapper.Generic
-
- Enclosing class:
- ToneMapper
public static class ToneMapper.Generic extends 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.filament.ToneMapper
ToneMapper.ACES, ToneMapper.ACESLegacy, ToneMapper.Filmic, ToneMapper.Generic, ToneMapper.Linear
-
-
Constructor Summary
Constructors Constructor Description Generic()Builds a new generic tone mapper parameterized to closely approximate theToneMapper.ACESLegacytone mapper.Generic(float contrast, float midGrayIn, float midGrayOut, float hdrMax)Builds a new generic tone mapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetContrast()Returns the contrast of the curve as a strictly positive value.floatgetHdrMax()Returns the maximum input value that will map to output white, as a value >= 1.0.floatgetMidGrayIn()Returns the middle gray point for input values as a value between 0.0 and 1.0.floatgetMidGrayOut()Returns the middle gray point for output values as a value between 0.0 and 1.0.voidsetContrast(float contrast)Sets the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.voidsetHdrMax(float hdrMax)Defines the maximum input value that will be mapped to output white.voidsetMidGrayIn(float midGrayIn)Sets the input middle gray, between 0.0 and 1.0.voidsetMidGrayOut(float midGrayOut)Sets the output middle gray, between 0.0 and 1.0.-
Methods inherited from class com.google.android.filament.ToneMapper
finalize, getNativeObject
-
-
-
-
Constructor Detail
-
Generic
public Generic()
Builds a new generic tone mapper parameterized to closely approximate theToneMapper.ACESLegacytone mapper. The default values are:- contrast = 1.55f
- midGrayIn = 0.18f
- midGrayOut = 0.215f
- hdrMax = 10.0f
-
Generic
public Generic(float contrast, float midGrayIn, float midGrayOut, float hdrMax)Builds a new generic tone mapper.- Parameters:
contrast- : controls the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.midGrayIn- : sets the input middle gray, between 0.0 and 1.0.midGrayOut- : sets the output middle gray, between 0.0 and 1.0.hdrMax- : defines the maximum input value that will be mapped to output white. Must be >= 1.0.
-
-
Method Detail
-
getContrast
public float getContrast()
Returns the contrast of the curve as a strictly positive value.
-
setContrast
public void setContrast(float contrast)
Sets the contrast of the curve, must be > 0.0, values in the range 0.5..2.0 are recommended.
-
getMidGrayIn
public float getMidGrayIn()
Returns the middle gray point for input values as a value between 0.0 and 1.0.
-
setMidGrayIn
public void setMidGrayIn(float midGrayIn)
Sets the input middle gray, between 0.0 and 1.0.
-
getMidGrayOut
public float getMidGrayOut()
Returns the middle gray point for output values as a value between 0.0 and 1.0.
-
setMidGrayOut
public void setMidGrayOut(float midGrayOut)
Sets the output middle gray, between 0.0 and 1.0.
-
getHdrMax
public float getHdrMax()
Returns the maximum input value that will map to output white, as a value >= 1.0.
-
setHdrMax
public void setHdrMax(float hdrMax)
Defines the maximum input value that will be mapped to output white. Must be >= 1.0.
-
-