Class ColorGrading
This class holds settings for the Color Grading effect.
Inherited Members
Namespace: UnityEngine.Rendering.PostProcessing
Syntax
public sealed class ColorGrading : PostProcessEffectSettings
Fields
blueCurve
Remaps the blue channel.
Declaration
public SplineParameter blueCurve
Field Value
Type | Description |
---|---|
SplineParameter |
Remarks
This is only used when working with LowDefinitionRange.
brightness
Makes the image brighter or darker.
Declaration
public FloatParameter brightness
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when working with LowDefinitionRange.
colorFilter
Tints the render by multiplying a color.
Declaration
public ColorParameter colorFilter
Field Value
Type | Description |
---|---|
ColorParameter |
contrast
Expands or shrinks the overall range of tonal values.
Declaration
public FloatParameter contrast
Field Value
Type | Description |
---|---|
FloatParameter |
externalLut
A custom 3D log-encoded texture.
Declaration
public TextureParameter externalLut
Field Value
Type | Description |
---|---|
TextureParameter |
Remarks
This is only used when working with External.
gain
Controls the lightest portions of the render.
Declaration
public Vector4Parameter gain
Field Value
Type | Description |
---|---|
Vector4Parameter |
Remarks
The neutral value is (1, 1, 1, 0)
.
gamma
A power function that controls mid-range tones.
Declaration
public Vector4Parameter gamma
Field Value
Type | Description |
---|---|
Vector4Parameter |
Remarks
The neutral value is (1, 1, 1, 0)
.
gradingMode
The grading mode to use.
Declaration
public GradingModeParameter gradingMode
Field Value
Type | Description |
---|---|
GradingModeParameter |
greenCurve
Remaps the green channel/
Declaration
public SplineParameter greenCurve
Field Value
Type | Description |
---|---|
SplineParameter |
Remarks
This is only used when working with LowDefinitionRange.
hueShift
Shifts the hue of all colors.
Declaration
public FloatParameter hueShift
Field Value
Type | Description |
---|---|
FloatParameter |
hueVsHueCurve
Remaps the hue according to the current hue.
Declaration
public SplineParameter hueVsHueCurve
Field Value
Type | Description |
---|---|
SplineParameter |
hueVsSatCurve
Remaps the saturation according to the current hue.
Declaration
public SplineParameter hueVsSatCurve
Field Value
Type | Description |
---|---|
SplineParameter |
ldrLut
A custom lookup texture (strip format, e.g. 256x16) to apply before the rest of the color grading operators. If none is provided, a neutral one will be generated internally.
Declaration
public TextureParameter ldrLut
Field Value
Type | Description |
---|---|
TextureParameter |
Remarks
This is only used when working with LowDefinitionRange.
ldrLutContribution
How much of the lookup texture will contribute to the color grading.
Declaration
public FloatParameter ldrLutContribution
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when working with LowDefinitionRange.
lift
Controls the darkest portions of the render.
Declaration
public Vector4Parameter lift
Field Value
Type | Description |
---|---|
Vector4Parameter |
Remarks
The neutral value is (1, 1, 1, 0)
.
lumVsSatCurve
Remaps the saturation according to the current luminance.
Declaration
public SplineParameter lumVsSatCurve
Field Value
Type | Description |
---|---|
SplineParameter |
masterCurve
Remaps the luminosity values.
Declaration
public SplineParameter masterCurve
Field Value
Type | Description |
---|---|
SplineParameter |
Remarks
This is only used when working with LowDefinitionRange.
mixerBlueOutBlueIn
Modifies the influence of the blue channel within the overall mix.
Declaration
public FloatParameter mixerBlueOutBlueIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerBlueOutGreenIn
Modifies the influence of the green channel within the overall mix.
Declaration
public FloatParameter mixerBlueOutGreenIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerBlueOutRedIn
Modifies the influence of the red channel within the overall mix.
Declaration
public FloatParameter mixerBlueOutRedIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerGreenOutBlueIn
Modifies the influence of the blue channel within the overall mix.
Declaration
public FloatParameter mixerGreenOutBlueIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerGreenOutGreenIn
Modifies the influence of the green channel within the overall mix.
Declaration
public FloatParameter mixerGreenOutGreenIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerGreenOutRedIn
Modifies the influence of the red channel within the overall mix.
Declaration
public FloatParameter mixerGreenOutRedIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerRedOutBlueIn
Modifies the influence of the blue channel within the overall mix.
Declaration
public FloatParameter mixerRedOutBlueIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerRedOutGreenIn
Modifies the influence of the green channel within the overall mix.
Declaration
public FloatParameter mixerRedOutGreenIn
Field Value
Type | Description |
---|---|
FloatParameter |
mixerRedOutRedIn
Modifies the influence of the red channel within the overall mix.
Declaration
public FloatParameter mixerRedOutRedIn
Field Value
Type | Description |
---|---|
FloatParameter |
postExposure
Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.
Declaration
public FloatParameter postExposure
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when working with HighDefinitionRange.
redCurve
Remaps the red channel.
Declaration
public SplineParameter redCurve
Field Value
Type | Description |
---|---|
SplineParameter |
Remarks
This is only used when working with LowDefinitionRange.
saturation
Pushes the intensity of all colors.
Declaration
public FloatParameter saturation
Field Value
Type | Description |
---|---|
FloatParameter |
satVsSatCurve
Remaps the saturation according to the current saturation.
Declaration
public SplineParameter satVsSatCurve
Field Value
Type | Description |
---|---|
SplineParameter |
temperature
Sets the white balance to a custom color temperature.
Declaration
public FloatParameter temperature
Field Value
Type | Description |
---|---|
FloatParameter |
tint
Sets the white balance to compensate for a green or magenta tint.
Declaration
public FloatParameter tint
Field Value
Type | Description |
---|---|
FloatParameter |
toneCurveGamma
Applies a gamma function to the curve.
Declaration
public FloatParameter toneCurveGamma
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
toneCurveShoulderAngle
Affects how much overshot to add to the shoulder.
Declaration
public FloatParameter toneCurveShoulderAngle
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
toneCurveShoulderLength
Affects how many F-stops (EV) to add to the dynamic range of the curve.
Declaration
public FloatParameter toneCurveShoulderLength
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
toneCurveShoulderStrength
Affects the transition between the mid section and the shoulder of the curve. A value of 0 means no shoulder, value of 1 means a very hard transition.
Declaration
public FloatParameter toneCurveShoulderStrength
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
toneCurveToeLength
Affects how much of the dynamic range is in the toe. With a small value, the toe will be very short and quickly transition into the linear section, and with a longer value having a longer toe.
Declaration
public FloatParameter toneCurveToeLength
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
toneCurveToeStrength
Affects the transition between the toe and the mid section of the curve. A value of 0 means no toe, a value of 1 means a very hard transition.
Declaration
public FloatParameter toneCurveToeStrength
Field Value
Type | Description |
---|---|
FloatParameter |
Remarks
This is only used when Custom is active.
tonemapper
The tonemapping algorithm to use at the end of the color grading process.
Declaration
public TonemapperParameter tonemapper
Field Value
Type | Description |
---|---|
TonemapperParameter |
Remarks
This is only used when working with HighDefinitionRange.
Methods
IsEnabledAndSupported(PostProcessRenderContext)
Returns true
if the effect is currently enabled and supported.
Declaration
public override bool IsEnabledAndSupported(PostProcessRenderContext context)
Parameters
Type | Name | Description |
---|---|---|
PostProcessRenderContext | context | The current post-processing render context |
Returns
Type | Description |
---|---|
Boolean |
|