volume
A module script.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2preseed/volume.module — the demo's emissive-volume pipeline. Per-part 3D volumes filled by a part-supplied `.computeShader` asset, raymarched front-to-back by the `preseed.emission_raymarch` computeShader asset into ONE fixed-size render target, then depth-aware composited over the scene before the demo's grade passes (priority 5, so the rays feed bloom + tonemap). Textures use stable keys and are (re)created without a paired destroy — creation with an unchanged key + size is a safe replace, and the fixed target size means no resize path exists at runtime. The uniform buffers are held as handles per volume and released in `M.destroy`.
volName(n: ?) → void
| arg | type | description |
|---|---|---|
| n | ? |
fillUName(n: ?) → void
| arg | type | description |
|---|---|---|
| n | ? |
rmUName(n: ?) → void
| arg | type | description |
|---|---|---|
| n | ? |
raymarcher( ) → void
compositeLive( ) → void
Whether the composite is standing in the chain right now. `ready` alone is a claim about the past: the boundary evicts every pass that is not the film's own, so a part entered after one that used a volume finds the flag set and the pass gone. Asking the chain is what makes `ensure` mean what it says.
ensure( ) → void
spawn(spec: ?) → void
spec: { name, -- unique per part size = {x,y,z}?, -- volume resolution, default { 96, 96, 96 } fillShader, -- the part's `.computeShader` asset, resolved by the -- part itself. It binds `vol`, the volume it writes -- (RGB emission, A density), and `U`, the fill -- parameters it reads. Dispatched at -- workgroup_size(4, 4, 4). fillUniformBytes?, -- size of the fill uniform run, default 128 }
| arg | type | description |
|---|---|---|
| spec | ? |
fill(name: ?, fillUniforms: ?) → void
| arg | type | description |
|---|---|---|
| name | ? | |
| fillUniforms | ? |
frame(name: ?, params: ?) → void
params: { camera, aabbMin, aabbMax, stepSize?, maxSteps?, densityGain?, emissionGain?, alphaCutoff? }
| arg | type | description |
|---|---|---|
| name | ? | |
| params | ? |
destroy(name: ?) → void
Release a part's volume resources (the shared RT + composite stay).
| arg | type | description |
|---|---|---|
| name | ? |
setSky(opts: ?) → void
Configure the scene's procedural sky (the scene's "sky" entity). opts: { zenithColor?, horizonColor?, groundColor? (arrays), sunIntensity?, turbidity?, timeOfDay?, starsIntensity? }
| arg | type | description |
|---|---|---|
| opts | ? |
col(c: ?) → void
| arg | type | description |
|---|---|---|
| c | ? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.