parallax layered bokeh depth

veiland-parallax · overlays · example scene: parallax.toml

Three depth layers of soft bokeh circles drifting at different speeds. A subtle depth cue over any background, fully procedural.

parallax scene capture

The layer ratios (size, speed, and opacity per depth) are fixed. No image files are involved; everything is generated.

Properties

keytypedefaultmeaning
color[r,g,b,a]`[1.0, 1.0, 1.0, 0.2]`Circle color; the alpha is the master opacity of the whole effect.
size_pxfloat`80.0`Max circle radius of the near layer, in logical px; the deeper layers scale down from it. Clamped to 4 to 512.
densityfloat`0.5`Fraction of the layout grid that holds a circle, 0 to 1.
speedfloat`8.0`Near-layer drift in px/s; deeper layers move slower. Clamped to 0 to 200.
angle_degfloat`30.0`Drift direction; `0` is rightward, `90` is upward.
softnessfloat`0.5`Edge feather as a fraction of the radius. `1.0` is fully soft bokeh, small values give crisp dots. Clamped to 0.02 to 1.
seedinteger`2654435769`Layout seed; change it to reshuffle all three layers.

every key is optional; omit it and the default applies. misspelled keys are silently ignored, so if a setting seems to do nothing, check the spelling against this table. colors are 0.0–1.0 float arrays.