ScreenSpaceReflectionsSettings class Rendering
Screen-space reflection settings for a Scene.
Reachable through Scene.screenSpaceReflections. Screen-space
reflections (SSR) trace the rendered image to add sharp, view-dependent
reflections on top of the smooth image-based reflections every surface
already receives from the scene environment. A surface the trace cannot
resolve (a ray that leaves the screen, finds no hit, or lands on too
rough a surface) falls back to that environment reflection, so SSR is a
refinement layer and never removes reflection detail.
Disabled by default: a fresh scene does no reflection tracing and adds no render passes. Set enabled to turn it on.
The trace reconstructs view-space positions and normals from a camera depth prepass, so it needs only a depth buffer (no normal buffer) and fits a forward renderer. It requires a PerspectiveCamera; other camera types render without it.
Constructors
Properties
- blur ↔ double
-
Glossy blur applied to the reflected color,
0for a sharp mirror. Higher values soften the reflection (and hide trace noise), widening with the hit distance.getter/setter pair - debugView ↔ SsrDebugView
-
A diagnostic visualization to render instead of the composited image.
Defaults to SsrDebugView.composite (the normal output).
getter/setter pair
- distanceFadeStart ↔ double
-
Where the reflection begins fading out, as a fraction (0..1) of its
reachable range (the closer of maxDistance and the stride/maxSteps
budget). Reflections ramp to zero from here to the range limit, so they
taper smoothly instead of hard-cutting.
1.0disables the fade;0.0fades gradually across the whole range.getter/setter pair - enabled ↔ bool
-
Whether screen-space reflections run. Off by default. When false the
scene adds no reflection passes and the image is unaffected.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- intensity ↔ double
-
Overall strength of the reflections, multiplying the per-pixel blend
weight.
1.0is the physical estimate; lower values fade reflections out, higher values exaggerate them.getter/setter pair - maxDistance ↔ double
-
How far, in world units, a reflected ray is marched before it is
considered to have missed. Larger values let reflections reach more
distant geometry at a higher trace cost.
getter/setter pair
- maxSteps ↔ int
-
The maximum number of march steps, a hard cost ceiling. Clamped to the
shader's maximum (currently 256). A reflection that reaches this budget
fades out (see distanceFadeStart) rather than cutting off.
getter/setter pair
- resolutionScale ↔ double
-
The resolution the reflections are traced at, as a fraction (0..1) of
the render size.
1.0traces at full resolution; lower values trace (and blur) the reflection layer more cheaply and bilinear-upscale it, leaving the rest of the image full resolution. The single biggest performance lever, and the main one to lower on mobile.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stride ↔ double
-
Pixels advanced along the screen per march step.
1samples every pixel the reflection crosses (highest quality, most costly); larger values sample more sparsely and cheaply, but can step over thin or grazing surfaces. This sets the reflection quality; maxSteps bounds its cost.getter/setter pair - thickness ↔ double
-
The assumed world-space thickness of surfaces, used to accept a ray
crossing as a hit. Too small misses thin or grazing geometry; too large
lets a ray passing behind an object falsely reflect it.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited