lib-composit · crate
kinogaki-composit
Comp's device-free half: each operator's parameters and maths, tone curves, and the plan a host compiles a network to.
- Repository
- lib-composit (kinogaki/lib-composit)
- Folder
libs/lib-composit/crates/composit- Source
- 12 files, 1,857 lines
- Tests
- 0 files, 0 lines
What it is
Comp's device-free half: each operator's parameters and maths, tone curves, and the plan a host compiles a network to.
A plan is ordered steps over linear ACEScg images, premultiplied, at each step's own size. It knows no network and no SDK: a host fills its Plan, and kinogaki-composit-wgpu runs it.
curve: tone curves and the log shaper for curves on scene light;image: images on the CPU, what the spatial references read and write;nodes: each operator's parameters decoded for the GPU and its maths on one pixel, the CPU reference its GPU kernel is held to.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-color | lib-color | normal | Color science and color management for Kinogaki. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-comp | Comp | normal | Comp as an SDK package (kinogaki.comp): what fills Studio's Comp context (kinogaki.core.comp, core declares it, inside a Render Output object). |
kinogaki-composit-wgpu | lib-composit | normal | Comp on a wgpu host's own device. |
Modules
curveTone curves: keys from 0 to 1 joined by a monotone cubic (Fritsch–Carlson, PCHIP's tangents) or straight lines, and the log shaper that lets a curve shape scene light above 1.286 linesimageImages on the CPU: what the spatial nodes' references (Bloom, Blur, Vignette) read and write, the GPU tests' expected results.72 linesnodesEach operator: its parameters decoded for the GPU and its maths on one pixel (the CPU reference the GPU kernels are tested against).17 linesnodes::bloomBloom: light above a threshold scattered over its neighbourhood, the way a lens and the eye spread bright light.324 linesnodes::blurBlur: a Gaussian, run across then down; with a Tolerance, an edge-preserving (cross-bilateral) one that smooths only among neighbours of like color.209 linesnodes::curvesCurves: tone curves on the color channels, the Master curve first, then each channel's own (R, G, B).169 linesnodes::gradeGrade, as Nuke's: a line through two points, then a gamma, per channel.304 linesnodes::hue_saturationHue / Saturation on Oklab's polar form (OkLCh).178 linesnodes::levelsLevels: the input range from black to white mapped through a gamma onto the output range, on the color channels together or on one channel.116 linesnodes::mergeMerge: image A over, plus or multiplying image B, premultiplied, at B's size; where A has no pixels it is transparent black.74 linesplanWhat a host compiles a network to: steps in order, each an operator over images it reads, the last's image what the plan shows.99 lines
Public types and traits
At the crate root
Structs CurveImagePlanStep
Enums InterpolationOpSlot
By module: 16 public types and traits in 10 modules
curve CurveInterpolation
image Image
nodes::bloom Bloom
nodes::blur Blur
nodes::curves Curves
nodes::grade GradeKnobs
nodes::hue_saturation HueSaturation
nodes::levels Levels
nodes::merge MergeOperation
plan OpPlanSlotStep
Besides these, 8 public functions at module level.
