Class VolumetricLightingSettings

Various options that control volumetric lighting for a specific view.

Constructors

  • Parameters

    • OptionalisEnabled: boolean
    • OptionalmaximumDistance: number
    • OptionalgridCellSize: Immutable<Vector2>
    • OptionalgridDepthSliceCount: number
    • OptionalgridDepthDistributionScale: number
    • OptionalisTemporalReprojectionEnabled: boolean
    • OptionalisTemporalJitterEnabled: boolean
    • OptionaltemporalHistoryWeight: number
    • OptionaltemporalMissSampleCount: number

    Returns VolumetricLightingSettings

Properties

_gridCellSize: Vector2
_gridDepthDistributionScale: number
_gridDepthSliceCount: number
_isEnabled: boolean
_isTemporalJitterEnabled: boolean
_isTemporalReprojectionEnabled: boolean
_maximumDistance: number
_temporalHistoryWeight: number
_temporalMissSampleCount: number

Accessors

  • get gridCellSize(): Vector2
  • Determines the size of a single grid cell (in X and Y directions), in pixels. Smaller cells result in more detailed lighting but linearly increase performance requirements.

    Returns Vector2

  • set gridCellSize(value): void
  • Parameters

    Returns void

  • get gridDepthDistributionScale(): number
  • Scales the distribution of volumetric light grid slices along Z. The distribution is exponential, where slices closer to the camera are smaller. Smaller scale value moves more slices nearer to the camera, while larger scale makes the distribution more linear (slices are more equally distributed).

    Returns number

  • set gridDepthDistributionScale(value): void
  • Parameters

    • value: number

    Returns void

  • get gridDepthSliceCount(): number
  • Determines in how many slices to split the volumetric light grid, on the Z axis. Higher values increase quality (esp. with larger maximum distances) but also linearly increase performance requirements.

    Returns number

  • set gridDepthSliceCount(value): void
  • Parameters

    • value: number

    Returns void

  • get isEnabled(): boolean
  • If enabled, volumetric lighting effects will be simulated. This means lights will interact with participating medium such as dust or steam. User can customize the participating medium density in order to control the effect.

    Returns boolean

  • set isEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isTemporalJitterEnabled(): boolean
  • Determines if subsequent temporal samples should be jittered. This hides aliasing and replaces it with noise. Suggested to keep on unless it's causing particular issues.

    Returns boolean

  • set isTemporalJitterEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isTemporalReprojectionEnabled(): boolean
  • If enabled, multiple samples will be taken over multiple frames and then used to calculate volumetric lighting. This reduces the performance load by distributing it over multiple frames, but may introduce ghosting artifacts with fast changing lighting.

    Returns boolean

  • set isTemporalReprojectionEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get maximumDistance(): number
  • Maximum distance at which the volumetric lighting effect will be applied at, in meters. Larger values increase distance but decrease sampling rate, potentially resulting in artifacts.

    Returns number

  • set maximumDistance(value): void
  • Parameters

    • value: number

    Returns void

  • get temporalHistoryWeight(): number
  • Determines how much weight to apply to previous frame data during temporal reprojection. Smaller values make the lighting respond to changes quicker, but increase aliasing.

    Returns number

  • set temporalHistoryWeight(value): void
  • Parameters

    • value: number

    Returns void

  • get temporalMissSampleCount(): number
  • Determines how many samples to evaluate when temporal history is deemed invalid (e.g. after a camera cut). This reduces noise on cuts or fast camera movements but will increase overall cost of the algorithm.

    Returns number

  • set temporalMissSampleCount(value): void
  • Parameters

    • value: number

    Returns void

Methods