Vixen
02b45cc4
csharp
public struct PostProcessSettings

A look, as a set of opinions rather than as a complete description.

Read the guide page for this →

Remarks

Every field is optional, and that is the whole design. A volume contributes only what it opted into and everything else falls through to whatever is underneath — so two volumes that each care about one thing can both apply, and a volume that only wants the cellar darker does not also silently reset the grade. Unreal spells the same idea with a bOverride_ boolean beside every property; C#'s nullable is that boolean, and the [DataContract] generator already writes one.

⚠ An unset field is not a zero. That distinction is the feature. A bloom intensity of zero means "no bloom here", which is a real thing to say; means "I have no opinion about bloom", which is a different one. Anything that flattens the two — an inspector showing an unset float as 0, a serializer writing defaults — turns every volume into a full replacement and the overlap rule into nonsense.

⚠ No field here is a resource name, and none is part of the lens. A name would change the frame's graph, which a volume cannot do — see [32](../../docs/plan/32-post-process-volumes.md) — and the aperture, the shutter, the ISO and the focal length belong to Camera, which is the one place they can be without two claimants on one number. Unreal puts them here, and a cine camera's depth of field being overridden by a level's volume is the well-known consequence.

Exposure is a compensation rather than a value, for the same reason. "This cellar is two stops under what the meter says" is a statement about the place and composes with whatever the camera and the auto-exposure decided; "this cellar is EV 9" is a second claimant on a number something else owns, and two overlapping volumes would fight over an absolute instead of adding two offsets.

This is what a volume authors. What the frame consumes is PostProcessOverlay, which is the fold of several of these and carries a weight per field — see there for why the two are different types.

Fields and properties (22)

  • public float? ExposureCompensation

    Stops added to whatever exposure the camera or the meter arrived at.

  • public float? LocalHighlightContrast

    How much the highlights are brought down by the local exposure, 0 for none.

  • public float? LocalShadowContrast

    And how much the shadows are brought up.

  • public float? BloomIntensity

    How much of the pyramid is composited into the image.

  • public float? BloomThreshold

    Luminance above which a pixel contributes, in the source's units.

  • public Vector3? BloomTint

    What colour the glow is tinted.

  • public float? Contrast

    Contrast, applied around middle grey.

  • public float? Saturation

    Saturation, 0 for greyscale.

  • public Vector3? ColourFilter

    A multiplier on the whole image before the curve.

  • public float? Temperature

    The colour temperature the scene is graded against, in kelvin.

  • public float? Tint

    Green against magenta, perpendicular to the temperature.

  • public float? HueShift

    Hue rotation, in degrees.

  • public float? FogDensity

    How thick the fog is.

  • public Vector3? FogColour

    What colour it is.

  • public float? VignetteIntensity

    0 is no darkening at the corners, 1 is fully dark.

  • public float? VignetteSmoothness

    How abrupt the vignette's falloff is.

  • public float? GrainIntensity

    How much film grain there is.

  • public float? AberrationStrength

    Channel offset at the screen edge, in UV units.

  • public float? FlareIntensity

    How bright the lens flare's ghosts are.

  • public float? MaximumDefocus

    How wide the defocus may get, in pixels.

  • public static PostProcessSettings None

    A look with no opinions at all, which is what a fold starts from.

  • public readonly bool IsEmpty

    Whether anything here has an opinion.

Used by (8)

  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • PostProcessOverlayVixen.Rendering
  • PostProcessVolumeVixen.Rendering
  • PostProcessVolumeSystemVixen.Rendering
  • PostProcessVolumeTestsVixen.Rendering.Tests
  • TypeRegistrationVixen.Rendering
  • Vixen_Rendering_Ecs_PostProcessSettingsSerializerVixen.Rendering
  • Vixen_Rendering_Ecs_PostProcessVolumeSerializerVixen.Rendering