Vixen
02b45cc4
csharp
public readonly record struct ColorGrading

A whole grade: one global range and three weighted by luminance.

Read the guide page for this →

Remarks

Unreal's decomposition, and it replaces four of Unity's separate effects — Lift/Gamma/Gain, Shadows/Midtones/Highlights, Channel Mixer and Colour Curves are all ways of authoring a colour transform, and adopting four overlapping models because one engine ships four is how a grading stack becomes unexplainable. See docs/plan/30.

The three ranges are a partition. Their weights sum to one at every luminance, so setting all three to the same values gives the same picture as setting Global to them. That property is what makes the decomposition usable rather than four controls fighting over the same pixels.

⚠ What this cannot express is the one real loss against Unity: hue-versus-hue and hue-versus-saturation curves are not a CDL, and no combination of these five operations is one. That is what a grading LUT is for.

Fields and properties (7)

  • public ColorGradingRange Global

    Applied everywhere, before the three ranges.

  • public ColorGradingRange Shadows

    Applied where the image is dark.

  • public ColorGradingRange Midtones

    Applied in between.

  • public ColorGradingRange Highlights

    Applied where the image is bright.

  • public float ShadowsMax

    Where the shadow range stops contributing, in exposure-normalised luminance.

  • public float HighlightsMin

    Where the highlight range starts contributing.

  • public static ColorGrading Neutral

    A grade that changes nothing, and the base to write one from.

Used by (6)

  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • TonemapAssetVixen.Rendering.PostFx
  • TonemapRendererVixen.Rendering.PostFx
  • TypeRegistrationVixen.Rendering.PostFx
  • Vixen_Rendering_PostFx_ColorGradingSerializerVixen.Rendering.PostFx
  • Vixen_Rendering_PostFx_TonemapAssetSerializerVixen.Rendering.PostFx