Repository

lib-composit

Comp's operators and their GPU executor, beside Kinogaki Studio's Comp plugin (which holds the node types and compiles a network to a plan): plans of steps that turn a render engine's images (the beauty and its outputs, linear ACEScg, premultiplied, at each ...

GitHub
kinogaki/lib-composit (private)
Folder
libs/lib-composit/
Crates
2
Rust lines
2,968 in src, 657 in tests
depends on (an edge implied by others shows when you point at a box)used by tests alone

Crates

CrateWhat it isFilesLinesTest lines
kinogaki-compositComp's device-free half: each operator's parameters and maths, tone curves, and the plan a host compiles a network to.121,8570
kinogaki-composit-wgpuComp on a wgpu host's own device.121,111657

README

lib-composit

Comp's operators and their GPU executor, beside Kinogaki Studio's Comp plugin (which holds the node types and compiles a network to a plan): plans of steps that turn a render engine's images (the beauty and its outputs, linear ACEScg, premultiplied, at each step's own size) and image files into what a view shows or a final render writes. It runs on the GPU, on the host's own wgpu device (wgpu 30, Studio's version). The crate docs describe what exists.

CrateRole
kinogaki-composit (crates/composit)No device: each operator's parameters decoded for the GPU and its maths on one pixel (the CPU reference), tone curves, and the plan a host compiles a network to
kinogaki-composit-wgpu (crates/wgpu)The executor: a plan's steps as compute passes encoded into the host's encoder, pooled step textures, reruns only what changed
Module (kinogaki-composit)Role
curveTone curves (monotone cubic or straight keys from 0 to 1) and ACEScct's log shaper for curves on scene light
imageImages on the CPU, which the spatial operators' references read and write
nodesLevels, Curves, Grade, Hue / Saturation (OkLCh), Blur, Bloom and Merge: each operator's decoded parameters and its maths (the CPU reference)
planSteps in order, each an operator over the images it reads, the last's image what the plan shows; only values, so a host compares two plans' steps to know what changed
Module (kinogaki-composit-wgpu)Role
executorExecutor::run: a plan on the images a host lends it (Images: the render's outputs and the image files) into the host's encoder, giving the image it shows (Shown)
kernelsCompute kernels (WGSL in kernels/shaders, shared pieces such as oklab.wgsl put first), each listing its bindings; compiled when first needed
workA step's passes, uniforms and scratch (Blur's half-blurred image, Bloom's levels, Curves' table), rebuilt only when its shape, inputs or size change
poolRgba16Float textures: each step's output, and the textures hosts hold an image's pixels in

Siblings

It reaches sibling checkouts as the Kinogaki Studio tree has them under libs/: ../lib-color (the matrices and Oklab the CPU references use), ../lib-ui and ../lib-misc-utils (the frozen crates the patch table names).

Checks