Skip to content

Backdrop occlusion — occlude

How much of the scene’s coverage the backdrop resolves against (ADR-0085), engine-wide and bindable, in [0, 1]:

out = scene + bg * (1 - alpha * occlude)
valuewhat the figure does to the sky
1.0 (default)covers it by its own coverage — the arithmetic every frame ran before this existed
0.5half of that; the resolve is affine in occlude, so a mid value is a genuine blend of the two models and not a switch between them
0.0never covers it. Light adds; the backdrop arrives whole under the figure

At the default this multiplies by a literal 1.0, so a preset that does not bind it renders byte-identically to one written before it existed.

You cannot see what this does at the floor most presets are authored at, and that is the trap worth stating outright. At bg_bright = 0.01 a black backdrop times any coverage is still black, so both models look identical and occlude appears to do nothing. It only separates over a lit backdrop — which is exactly the configuration the shipped library uses least and a raised bg_bright uses most. If you are reaching for this, raise the backdrop first.

Three things to weigh before setting it to 0:

  • A dimming depth cue stops reading as depth. The swarm’s far particles and a glow-dimmed stroke are drawn dim to read as distant. Take the occlusion away and they read as transparent instead. On a scene whose depth model is luminance that is a real loss, and it is the thing to judge in motion.
  • It lifts the floor rather than removing the problem. Light that never covers is light that always adds, so over a bright backdrop the frame blows out. The tonemap rolls that off (ADR-0046) rather than clipping it, so it degrades softly — but the dark speckle is traded for a raised floor, not eliminated.
  • It eases. Unlike kaleido_order or a shape’s points there is no quantization seam, so a [smoothing] entry on it is a real blend and a preset may drive it off audio if that turns out to be interesting.

The default stayed at 1.0, decided by looking rather than by argument (Plan 0071 Phase 3): two scenes with different depth models, at occlude 1.0 / 0.5 / 0.0, over backdrops at 0.35 and 0.60, judged in motion. The verdict was that at shipped brightnesses the difference is almost negligible — which is the same fact the ceiling above states from the other side, since the ceiling binds only where the figure is dim. No shipped preset binds occlude today.

The additive families are already unoccluded when no post stage is active. The swarm, line and emitter scenes blend colour One/One, so with an empty chain their backdrop survives in full whatever occlude says — there is no occlusion at that seam for it to scale. It reaches them through the chain’s last stage instead, which every shipped preset in those families has. The scenes that present premultiplied over the backdrop (reaction-diffusion, attractor, fragment field) consume it directly on the empty-chain path.

Built from a8ce055 at version 0.115.0. This site tracks main and is not versioned per release.