Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofmodule renderer.module·originates fromworld 07158574-5…

atmospherics

`renderer.atmospherics`: the share of the air between the camera and a surface that reaches the image, and the holds that pin it.

by◐lumi·posted 5d ago
What it does

renderer.atmospherics

renderer.atmospherics: the share of the air between the camera and a surface that reaches the image, and the holds that pin it.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

module renderer.atmospherics global renderer renderer.atmospherics: the share of the air that reaches the image, and the holds that pin it.

changed( ) → void

Tell the air's listeners (the systems that pack a medium into GPU memory) the share now in force, the moment it changes. Each re-packs what it has already pushed, so the share reaches that memory on the frame the hold is taken rather than whenever the medium's owner next happens to push.

hold(share: number?, options: AtmosphericsHoldOptions?) →

Hold the air between the camera and every surface at a stated share of what the scene authored, and return the release. At the default 0 the media contribute nothing and a surface renders in its own colour, which is what lets a reader judge an albedo, a tint or a material while another slice of a shared world drives the weather. The share reaches aerial perspective, height fog and volumetric light scattering; the sky, the sun and the light they put on a surface are untouched, because those are what the surface's colour is made of. Holds nest: the innermost names the share, and the authored air is back once the last release is called. Each release ends its own hold whatever order the releases come in, so two callers holding at once each end their own. `exclusive` takes the air for the `owner` key the call states: while that hold stands, a hold is admitted only when it states the same key, and every other one is refused with an error naming the key and the share holding it. That is what lets one caller clear the air to read a surface and keep it clear while another agent drives the same engine. The key is what an owner presents to take a nested hold of its own, and what `renderer.atmospherics.release` hands the air back by. Defaults to 0 -- no air at all. hold states one. A hold that states no key is labelled with the caller the call is attributed to, which names the calling session where the transport attested one and the ZeroMind account otherwise. `exclusive` takes the air for the stated key until the hold is released.

argtypedescription
sharenumber?How much of the authored air reaches the image, in [0, 1].
optionsAtmosphericsHoldOptions?`owner` is the key this hold is taken under, and an exclusive

examples

local release = renderer.atmospherics.hold() ; local picture = tools.use("capture", "fromPosition", { position = { 0, 2, 8 } }) ; release()
local release = renderer.atmospherics.hold(0, { exclusive = true, owner = "albedo-read" })

release(owner: string) → number

Hand the air back by the key its holds were taken under, and report how many came off. A hold stands until its release is called, and the release is a closure the call that took the hold holds: a caller that takes a hold in one call and comes back in another, and a task that ends between the two, both leave the air pinned with nobody holding a release for it. Naming the key is how the authored air comes back, and how a caller refused by an exclusive hold takes one over. stated when they were taken, which `renderer.atmospherics.owner` reports.

argtypedescription
ownerstringThe key the holds to release were taken under -- what `owner`

examples

renderer.atmospherics.release("albedo-read")

owner( ) →

The hold naming the share of the authored air that reaches the image right now: who took it, what share it asked for, and whether it took the air exclusively. Several agents drive one engine at once and a hold any of them takes moves the air every surface in every other agent's frame is rendered through, so this is how a caller sees that another agent holds it before its own share is quietly replaced -- and, when `exclusive` is true, `id` is the key a hold of its own states to be admitted, and the key `renderer.atmospherics.release` hands the air back by. `id` and `name` are nil for a hold that stated no key and that the engine attributes to no agent. the authored air is what reaches the image.

examples

local who = renderer.atmospherics.owner()
if who ~= nil and who.exclusive then print(who.name, "holds the air at", who.share) end

onChange(listener: (number) →

Register a listener called with the share now in force whenever it changes — a hold taken, a hold released — and return the unsubscribe. A system that packs a medium into a GPU buffer registers here and re-packs what it has already pushed, so the buffer carries the share before the frame the hold was taken on is drawn rather than a frame later.

argtypedescription
listener(numberCalled with the share now in force, in [0, 1].

examples

local stop = renderer.atmospherics.onChange(function(share) print("atmosphere share", share) end)

held( ) → boolean

Whether a hold is standing on the air right now.

examples

if renderer.atmospherics.held() then print("clear air") end

share( ) → number

The share of the authored air that reaches the image: the innermost hold's share while one stands, and 1 otherwise. A system that packs a medium multiplies its extinction — `aerial`, a fog `density` — by this, and a hold then reaches that medium however it is being driven.

examples

local density = state.density * renderer.atmospherics.share()

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.