ScreenSpaceReflections
Wet floors and metal that shows the room.
Screen-space reflections ray-march the depth and normal buffers of the frame already drawn, so anything on screen can reflect anything else on screen: rail in a flooded tunnel, a lamp in a steel wall. What is off screen cannot reflect, which is the trade you make for not rendering the scene twice.
The engine work lives in an adapter plugin. A project made with bjs create installs it for you:
src/main.ts calls every adapter/register.ts that bjs download puts in
the project, before the scene loads. If you boot the game from your own code,
call it once:
The playground does the same. Without it the component is inert.
Knobs
| Field | Default | What it does |
|---|---|---|
active | true | Master switch. |
strength | 0.8 | How much reflection is mixed in. |
reflectivityThreshold | 0.04 | Surfaces below this reflectivity stay matte. Raise it on a kit-bashed scene so rock stays rock and only metal and water shine. |
maxDistance | 40 | How far a ray may travel, world units. |
thickness | 0.5 | Assumed surface thickness for the march. Too small and thin rails are missed; too large and reflections smear. |
maxSteps | 48 | Ray-march steps. Sharper and slower as it rises. |
blur | 0.03 | 0 is a mirror. |
roughnessFactor | 0.2 | Rough materials reflect less. 0 disables. |
downsample | 1 | Reflection pass at half resolution. 0 for full, 2 for quarter. |
Every field is live: change one on the component and the next frame shows it.
Pairs with
An EnvironmentTexture, always. Reflections fill in what the environment map
cannot know about — the room — but the environment is what makes the metal
read as metal in the first place. ToneMapping keeps the bright reflections
from clipping.

























