grade
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
grade
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2ffe.cinema.grade — the glass and the print. Five things, all of them driven off film time, none of them authored twice: THE LENS focal length comes from the shot's `fov` and nothing else (`Shots.focalLength`), so a set-up states its field of view and the depth of field follows from the optics. FOCUS racked per shot. A shot that names `focus` racks between those distances; a shot that does not focuses on whatever it is aimed at. THE SHUTTER 180 degrees, the film convention: the blur is half of each frame's travel, out of the velocity buffer the renderer already writes. THE METER bounded auto exposure. This film's second half is nearly black, and an unbounded meter would open up and lift the sooted snow back to grey — which would erase the arc. The bounds tighten as `Film.ruin` climbs, and the compensation walks down with it. THE PRINT grain, and one colour lookup table per MOVEMENT. Three movements: the clean gold afternoon, the barrage, and the cold sooty end the underfire orange arrives in.
try(what: string, fn: any, arg: any) → boolean
| arg | type | description |
|---|---|---|
| what | string | |
| fn | any | |
| arg | any |
splitTone(warm: number, cool: number, pivot: number) → void
The three movements, and the look each is printed with. A movement is a stretch of the film with one grade. The boundaries are the two turns of the story: the registration round leaving the tube, and the barrage having changed what the sky-floor is. SPLIT TONE. The one move the whole film's colour rests on: the highlights go toward the sun's gold and the shadows toward the cold blue-violet of snow lit only by sky, on a curve of the pixel's own luminance. A grade of lift/gamma/gain cannot do this — it moves every pixel of a channel the same way — so it is written as a cross-channel pass and composed after the grade. warm how far the highlights go toward gold cool how far the shadows go toward blue-violet pivot the luminance the two meet at
| arg | type | description |
|---|---|---|
| warm | number | |
| cool | number | |
| pivot | number |
after(r: number, g: number, b: number) → void
The one cross-channel move in the film's grade, and the reason this movement is built with `lut.build` rather than `lut.fromGrade`: a `GradeSpec.curve` is per channel — `(v) -> v` — so it cannot ask what the OTHER two channels are doing. Holding the underfire orange up while everything else goes cold is exactly that question: a warm bright pixel keeps its chroma, a neutral one loses more of it.
| arg | type | description |
|---|---|---|
| r | number | |
| g | number | |
| b | number |
table(m: any) → any
A movement's table: the grade, then its cross-channel pass if it has one.
| arg | type | description |
|---|---|---|
| m | any |
movementAt(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
installLuts( ) → void
build(_root: any) → void
| arg | type | description |
|---|---|---|
| _root | any |
lens(setup: any, eye: { number }, at: { number }, fov: number, u: number) → void
Apply the lens for one frame. `eye`/`at` come from the shot, so focus and field of view can never disagree with the camera.
| arg | type | description |
|---|---|---|
| setup | any | |
| eye | { number } | |
| at | { number } | |
| fov | number | |
| u | number |
tick(t: number, dt: number) → void
| arg | type | description |
|---|---|---|
| t | number | |
| dt | number |
reset( ) → void
report(t: number) → void
| arg | type | description |
|---|---|---|
| t | number |
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.