Class ScreenSpaceReflectionsSettings

Settings that control the screen space reflections effect. Screen space reflections provide high quality mirror-like reflections at low performance cost. They should be used together with reflection probes as the effects complement each other. As the name implies, the reflections are only limited to geometry drawn on the screen and the system will fall back to refl. probes when screen space data is unavailable. Similarly the system will fall back to refl. probes for rougher (more glossy rather than mirror-like) surfaces. Those surfaces require a higher number of samples to achieve the glossy look, so we instead fall back to refl. probes which are pre-filtered and can be quickly sampled.

Constructors

  • Parameters

    • OptionalisEnabled: boolean
    • Optionalquality: number
    • Optionalintensity: number
    • OptionalmaxRoughness: number
    • OptionaldownscaleFactor: number
    • OptionalcompareToleranceFactor: number
    • OptionalcompareToleranceMaximumDepthScale: number
    • OptionalcompareToleranceMaximumSteepnessScale: number
    • OptionalcompareToleranceMinimumSteepness: number
    • OptionalcompareToleranceRange: number
    • OptionalisHierarchicalZBufferEnabled: boolean

    Returns ScreenSpaceReflectionsSettings

Properties

_compareToleranceFactor: number
_compareToleranceMaximumDepthScale: number
_compareToleranceMaximumSteepnessScale: number
_compareToleranceMinimumSteepness: number
_compareToleranceRange: number
_downscaleFactor: number
_intensity: number
_isEnabled: boolean
_isHierarchicalZBufferEnabled: boolean
_maxRoughness: number
_quality: number

Accessors

  • get compareToleranceFactor(): number
  • Factor that determines the maximum distance between ray and geometry before it can be considered an intersection. If the difference is too large the ray is assumed to traverse behind the geometry, rather than intersecting it. Changing this value will modify the allowed difference by the provided factor.

    Returns number

  • set compareToleranceFactor(value): void
  • Parameters

    • value: number

    Returns void

  • get compareToleranceMaximumDepthScale(): number
  • Maximum factor that determines how much to increase the compare tolerance when near ray origin. The factor will be the largest near ray origin and scale down to 1 as the ray approaches the distance provided in the compare tolerance pixel range parameter.

    Returns number

  • set compareToleranceMaximumDepthScale(value): void
  • Parameters

    • value: number

    Returns void

  • get compareToleranceMaximumSteepnessScale(): number
  • Maximum factor that determines how much to increase the compare tolerance depending on view ray steepness compare to surface normal.

    Returns number

  • set compareToleranceMaximumSteepnessScale(value): void
  • Parameters

    • value: number

    Returns void

  • get compareToleranceMinimumSteepness(): number
  • Minimum value allowed by the steepness parameter used for comparison tolerance scaling. Prevents the comparison tolerance from being too high at steep angles and also controls the smoothstep curve used for steepness interpolation.

    Returns number

  • set compareToleranceMinimumSteepness(value): void
  • Parameters

    • value: number

    Returns void

  • get compareToleranceRange(): number
  • Range over which to apply compare tolerance depth scaling. When the ray length reaches the end of this range the depth scaling will be reduced to the factor of 1. In world space units.

    Returns number

  • set compareToleranceRange(value): void
  • Parameters

    • value: number

    Returns void

  • get downscaleFactor(): number
  • Factor that scales down input render targets used for generating SSR. This can result in major performance increase at a cost of quality. It is especially useful for high-DPI resolutions as SSR can be cost prohibitive to run at full resolution in that case.

    Factor of 1 means the effect will run at full resolution. Each further increase of the factor halves the resolution. i.e. 2 means half-resolution and 3 means quarter-resolution.

    Returns number

  • set downscaleFactor(value): void
  • Parameters

    • value: number

    Returns void

  • get intensity(): number
  • Intensity of the screen space reflections. Valid range is [0, 1]. Default is 1 (100%).

    Returns number

  • set intensity(value): void
  • Parameters

    • value: number

    Returns void

  • get isEnabled(): boolean
  • Enables or disables the SSR effect.

    Returns boolean

  • set isEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isHierarchicalZBufferEnabled(): boolean
  • Uses the hierarchical Z buffer for tracing the rays. Can yield better performance at a slight cost in quality.

    Returns boolean

  • set isHierarchicalZBufferEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get maxRoughness(): number
  • Roughness at which screen space reflections start fading out and become replaced with refl. probes. Valid range is [0, 1]. Default is 0.8.

    Returns number

  • set maxRoughness(value): void
  • Parameters

    • value: number

    Returns void

  • get quality(): number
  • Quality of the SSR effect. Higher values cast more sample rays, and march those rays are lower increments for better precision. This results in higher quality, as well as a higher performance requirement. Valid range is [0, 5], default is 3.

    Returns number

  • set quality(value): void
  • Parameters

    • value: number

    Returns void

Methods