-
public class ColorGrading
Creation, usage and destructionA ColorGrading object is created using the ColorGrading::Builder and destroyed by calling Engine::destroy(const ColorGrading*). A ColorGrading object is meant to be set on a View.ColorGradingis used to transform (either to modify or correct) the colors of the HDR buffer rendered by Filament. Color grading transforms are applied after lighting, and after any lens effects (bloom for instance), and include tone mapping.
PerformanceCreating a new ColorGrading object may be more expensive than other Filament objects as a 3D LUT may need to be generated. The generation of a 3D LUT, if necessary, may happen on the CPU. OrderingThe various transforms held by ColorGrading are applied in the following order:Engine engine = Engine.create(); ColorGrading colorGrading = ColorGrading.Builder() .toneMapping(ColorGrading.ToneMapping.ACES) .build(engine); myView.setColorGrading(colorGrading); engine.destroy(colorGrading);- Exposure
- Night adaptation
- White balance
- Channel mixer
- Shadows/mid-tones/highlights
- Slope/offset/power (CDL)
- Contrast
- Vibrance
- Saturation
- Curves
- Tone mapping
- Luminance scaling
- Gamut mapping
- Exposure: 0.0
- Night adaptation: 0.0
- White balance: temperature
0.0, and tint0.0 - Channel mixer: red
{1,0,0}, green{0,1,0}, blue{0,0,1} - Shadows/mid-tones/highlights: shadows
{1,1,1,0}, mid-tones{1,1,1,0}, highlights{1,1,1,0}, ranges{0,0.333,0.550,1} - Slope/offset/power: slope
1.0, offset0.0, and power1.0 - Contrast:
1.0 - Vibrance:
1.0 - Saturation:
1.0 - Curves: gamma
{1,1,1}, midPoint{1,1,1}, and scale{1,1,1} - Tone mapping: ToneMapper.ACESLegacy
- Luminance scaling: false
- Gamut mapping: false
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumColorGrading.QualityLevelColor grading quality level.
public enumColorGrading.LutFormatColor grading LUT format.
public enumColorGrading.ToneMappingList of available tone-mapping operators.
public classColorGrading.BuilderUse
Builderto construct aColorGradingobject instance.
-
Constructor Summary
Constructors Constructor Description ColorGrading(long colorGrading)
-
Method Summary
Modifier and Type Method Description longgetNativeObject()-
-
Method Detail
-
getNativeObject
long getNativeObject()
-
-
-
-