lib-composit · crate
kinogaki-composit-wgpu
Comp on a wgpu host's own device.
- Repository
- lib-composit (kinogaki/lib-composit)
- Folder
libs/lib-composit/crates/wgpu- Source
- 12 files, 1,111 lines
- Tests
- 2 files, 657 lines
Also 12 shader or C files, 473 lines.
What it is
Comp on a wgpu host's own device.
Executor::run encodes a kinogaki_composit::Plan into the host's command encoder: each step one or more compute passes (kernels), each step's node one pooled Rgba16Float texture at its first input's size, plus the scratch its passes share (Blur's half-blurred image, Bloom's levels, Curves' table). A step runs again only when its operator or what it reads changed, so a host can run the plan every frame and pay only for that. A slider's drag writes uniforms; only a new shape or size makes anything new.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-composit | lib-composit | normal | Comp's device-free half: each operator's parameters and maths, tone curves, and the plan a host compiles a network to. |
Third-party
| Crate | Version | Licence | Frozen in | As | Also used by |
|---|---|---|---|---|---|
bytemuck | 1.25.2 | Zlib OR Apache-2.0 OR MIT | lib-ui/vendor | normal | kinogaki-geometry, kinogaki-geometry-view, kinogaki-image-pipeline, kinogaki-math, kinogaki-pixel, kinogaki-ui, kinogaki-ui-wgpu, kinogaki-viewport-api and 2 more |
wgpu | 30.0.1 | MIT OR Apache-2.0 | lib-ui/vendor | normal | kinogaki-color-wgpu, kinogaki-editor, kinogaki-render-api, kinogaki-shared, kinogaki-ui-shell, kinogaki-ui-wgpu, kinogaki-viewport-gpu |
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). |
Modules
executor(private)The executor: a plan run on what a host lends it, each step's passes encoded into the host's encoder.268 lineskernelsCompute kernels, one module an op (WGSL inshaders/; shared pieces such asoklab.wgslare put before the kernels using them).218 lineskernels::bloomBloom's kernels (shaders/bloom_*.wgsl, each afterbloom_common.wgsl): a level down (Bloom::down_uniform), a level up (bloom::up_uniform) and the mix into the image (Bloom::mix_uniform).43 lineskernels::blurBlur's kernels: the Oklab guide (shaders/blur_guide.wgslafteroklab.wgsl, its uniformblur::guide_uniform) and a pass across or down (shaders/blur_pass.wgsl,Blur::uniform).26 lineskernels::curvesThe Curves kernel (shaders/curves.wgsl): its input, the curves' table (anRgba32FloatimageLUT_SIZE× 1 fromCurves::bake), its output and its uniform (Curves::uniform).65 lineskernels::gradeThe Grade kernel (shaders/grade.wgsl; its uniform isGrade::uniform).15 lineskernels::hue_saturationThe Hue / Saturation kernel (shaders/hue_saturation.wgslafteroklab.wgsl; its uniform isHueSaturation::uniform).15 lineskernels::levelsThe Levels kernel (shaders/levels.wgsl; its uniform isLevels::uniform).15 lineskernels::mergeThe Merge kernel (shaders/merge.wgsl): image B, image A, its output and its uniform (Merge::uniform).15 linespool(private)The textures steps write: one a step's node, at its size, remade when that changes and dropped when the node leaves the plan (nothing grows while a plan reruns), and the textures hosts hold an image's pixels in.77 lineswork(private)A step's GPU work: its passes (a kernel, its bindings, its workgroups), the uniforms they read, and the scratch between them (Blur's half-blurred image, Bloom's levels, Curves' table).348 lines
Public types and traits
At the crate root
Structs ExecutorFilmImageImagesOutcomeShown
Enums RunError
By module: 11 public types and traits in 2 modules
executor ExecutorFilmImageImagesOutcomeRunErrorShown
kernels BindKernelKernelIdKernelsResource
Besides these, 14 public functions at module level.
