Scripting API

Scripting API

CameraBloom

Record struct in Abyss.Core, from Abyss.Core.

A camera's bloom: what is bright spreads a glow round it, as light does in an eye or a lens. It draws in HDR, so what is brighter than white — a sun drawn ten times white, a torch's flame — glows, and with a CameraBloom.Threshold of 1 only that does. Bevy's Bloom, field for field; CameraBloom.Natural is its default.

public readonly record struct CameraBloom

Remarks

Laid out as abyss_core::post::CameraBloom is, 40 bytes.

Constructors

CameraBloom

public CameraBloom(float Intensity, float LowFrequencyBoost, float LowFrequencyBoostCurvature, float HighPassFrequency, float Threshold, float ThresholdSoftness, BloomComposite Composite, uint MaxMipDimension, Vector2 Scale)

A camera's bloom: what is bright spreads a glow round it, as light does in an eye or a lens. It draws in HDR, so what is brighter than white — a sun drawn ten times white, a torch's flame — glows, and with a CameraBloom.Threshold of 1 only that does. Bevy's Bloom, field for field; CameraBloom.Natural is its default.

Parameters

  • Intensity: How much of the glow is put on, nothing or more: 0.15 natural, 0.05 old-school.
  • LowFrequencyBoost: How much more of its widest spread is put on, nothing or more.
  • LowFrequencyBoostCurvature: How quickly that boost falls off toward the narrowest, from 0 to 1.
  • HighPassFrequency: How much of the narrowest is kept, from 0 to 1.
  • Threshold: How bright a pixel must be to glow, nothing or more; 0 for every pixel.
  • ThresholdSoftness: How softly a pixel near the threshold starts to glow, from 0 to 1.
  • Composite: How the glow is put on.
  • MaxMipDimension: The largest of the pictures the glow is spread over, in pixels: larger is finer and dearer.
  • Scale: How far it spreads across and up, each more than nothing; 1 and 1 round, wider across for a lens's streak.

Laid out as abyss_core::post::CameraBloom is, 40 bytes.

Properties

Intensity

public float Intensity { get; init; }

How much of the glow is put on, nothing or more: 0.15 natural, 0.05 old-school.

LowFrequencyBoost

public float LowFrequencyBoost { get; init; }

How much more of its widest spread is put on, nothing or more.

LowFrequencyBoostCurvature

public float LowFrequencyBoostCurvature { get; init; }

How quickly that boost falls off toward the narrowest, from 0 to 1.

HighPassFrequency

public float HighPassFrequency { get; init; }

How much of the narrowest is kept, from 0 to 1.

Threshold

public float Threshold { get; init; }

How bright a pixel must be to glow, nothing or more; 0 for every pixel.

ThresholdSoftness

public float ThresholdSoftness { get; init; }

How softly a pixel near the threshold starts to glow, from 0 to 1.

Composite

public BloomComposite Composite { get; init; }

How the glow is put on.

MaxMipDimension

public uint MaxMipDimension { get; init; }

The largest of the pictures the glow is spread over, in pixels: larger is finer and dearer.

Scale

public Vector2 Scale { get; init; }

How far it spreads across and up, each more than nothing; 1 and 1 round, wider across for a lens's streak.

Natural

public static CameraBloom Natural { get; }

Bevy's default: every pixel spreading a little, mixed in, as an eye sees.

OldSchool

public static CameraBloom OldSchool { get; }

Bevy's old-school bloom: only what is bright, added on top.

Anamorphic

public static CameraBloom Anamorphic { get; }

Bevy's anamorphic bloom: CameraBloom.Natural stretched four times across, a lens's streak.

ScreenBlur

public static CameraBloom ScreenBlur { get; }

Bevy's screen blur: the whole picture blurred, as for a menu over the game.