Builtin Library
README.md
display_writers
The ordered record of what is setting the chain's display transform.
__display__ carries one curve and one exposure for the whole frame. Several
things write them — every global PostProcess region with
setsDisplay = true, a scene's opening state, an agent's own setProperty
call — and this module records the live ones, newest last.
local DisplayWriters = require("@builtin::modules.display_writers")
DisplayWriters.push("look", { curve = 2, exposure = 1.5 }) -- ACES, +2/3 stop
DisplayWriters.remove("look") -- back to what stood
read()— what__display__holds now: the value the last write left, or the default the renderer declares for a property nothing has written.push(key, { curve, exposure })— show those values and recordkeyas the writer holding them. A key already recorded moves to the newest position.remove(key)— drop that writer. The display then shows the newest remaining writer's values, or what stood before the first writer arrived when none remain.count()— how many writers are live.
The record is one shared list, so the writers come off in any order: removing the older of two leaves the newer one's values standing, and removing the newer leaves the older's.
The exposure package drives __display__.exposure alone, from a GPU readback,
every tick it meters, and keeps that outside this list — so a region that
arrives or leaves sets the exposure and the package's next readback sets it
again. The package holds its own record of the exposure that stood before it
started metering and hands that back when it stops.