Vixen
02b45cc4
csharp
public record class VignetteAsset

Vignette, chromatic aberration and film grain — the lens-imperfection pass.

Read the guide page for this →

Remarks

Three effects in one node because they are one shader, and they are one shader because they are always applied together at the very end and each is a few instructions. Three full-screen passes would cost three times the bandwidth to save nothing.

⚠ After the tonemap. All three model the camera and the film rather than the scene. Grain applied to scene-referred light in particular is invisible in shadow and enormous in highlights, because it is a fixed amount added to an unbounded number.

Fields and properties (22)

  • public string Name

    The node's name, for debug groups and for a human reading the file.

  • public bool Enabled

    Whether the node runs.

  • public string Source

    The image it degrades.

  • public string Output

    The name the result is published under.

  • public PixelFormat Format

    The format of the target it declares.

  • public bool UseVignette

    Whether the corners are darkened.

  • public bool UseChromaticAberration

    Whether the channels are offset radially.

  • public bool UseGrain

    Whether grain is added.

  • public bool LuminanceWeightedGrain

    Whether grain scales with darkness, as real film does.

  • public float VignetteIntensity

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

  • public float VignetteSmoothness

    How abrupt the falloff is. Higher keeps the centre clear for longer.

  • public float AberrationStrength

    Channel offset at the screen edge, in UV units.

  • public float GrainIntensity

    How much grain there is.

  • public float GrainScale

    How large one grain is.

  • public Vector3 VignetteColour

    What colour the corners go towards.

  • public Vector2 VignetteCentre

    Where the vignette is centred, in UV. The screen's middle is (0.5, 0.5).

  • public float VignetteRoundness

    0 follows the aspect ratio, 1 is a circle whatever shape the screen is.

  • public bool UseLensDistortion

    Whether the image is warped radially before anything else reads it.

  • public float DistortionIntensity

    How far the image is pushed out (positive) or pulled in (negative) at the edges.

  • public Vector2 DistortionScale

    Per-axis multipliers, so one axis can be left undistorted.

  • public Vector2 DistortionCentre

    Where the distortion is centred, in UV.

  • public float DistortionZoom

    A zoom after the warp, to hide the border a positive distortion pulls in from.

Used by (4)

  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • TypeRegistrationVixen.Rendering.PostFx
  • Vixen_Rendering_PostFx_VignetteAssetSerializerVixen.Rendering.PostFx