Vixen
dd8b0a81
csharp
public record class LensFlareAsset

Ghosts, a halo and a starburst — what a bright source does to the rest of the frame.

Read the guide page for this →

Remarks

Not bloom with a different name. Bloom is light scattered a short way from where it landed; a flare is light that reflected between two lens elements and landed somewhere else. Where it lands is not arbitrary — a ghost sits on the line from the highlight through the centre of the frame — which is why the whole effect is one vector and a list of scales.

⚠ Before the tonemap and before !Bloom. A flare is light arriving at the sensor and has to be able to blow out. After the curve it is a wash over the picture, and a highlight already at white would gain a ghost brighter than itself.

⚠ Threshold is in the source's units, and it defaulted to one until 2026-09-10. In a physically lit frame that is cd/m² and nothing is near one, so a threshold of one flares the floor — every pixel of the picture reaches the bright pass and the ghosts become a second copy of the frame rather than a shape put where a highlight is. The same argument !Bloom's threshold makes, and the two moved together because a frame that blooms everything while flaring only the sun is a third state neither was designed for.

Fields and properties (20)

  • 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 linear HDR colour the flare is built from and added onto.

  • public string View

    The view whose lens supplies the blade count, or empty for StarburstBlades.

  • public string Output

    The name the result is published under.

  • public PixelFormat Format

    The format of the target it declares.

  • public float Threshold

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

  • public int Ghosts

    How many ghosts are traced along the centre vector.

  • public float GhostSpacing

    How far apart consecutive ghosts are, as a fraction of the vector to the centre.

  • public float GhostIntensity

    How bright the ghosts are.

  • public bool UseHalo

    Whether the halo ring is drawn.

  • public float HaloRadius

    How far out the halo ring sits, in UV.

  • public float HaloThickness

    How thick it is.

  • public float HaloIntensity

    How bright it is.

  • public float ChromaticOffset

    How far the three channels are sampled apart, in UV. Zero is no fringing.

  • public bool UseStarburst

    Whether the diaphragm's diffraction spikes are drawn.

  • public float StarburstBlades

    How many spikes, when no view supplies a blade count.

  • public float StarburstIntensity

    How strongly the spikes modulate the ghosts.

  • public float StarburstAngle

    A rotation on the spike pattern, in radians.

  • public Vector3 Tint

    A tint on the whole flare, for a lens with a coloured coating.

Used by (6)

  • PostEffectFactoryVixen.Rendering.PostFx
  • PostEffectTestsVixen.Rendering.PostFx.Tests
  • StandardFrameVixen.Rendering.PostFx
  • StandardFrameTestsVixen.Rendering.PostFx.Tests
  • TypeRegistrationVixen.Rendering.PostFx
  • Vixen_Rendering_PostFx_LensFlareAssetSerializerVixen.Rendering.PostFx