Plugin

Spectre

Spectre plugin

Spectre, Kinogaki Studio's spectral path tracer, and the render engine on the SDK around it. The renderer itself knows no SDK: src/tracer/ (what it computes on the CPU), src/metal/ (the Metal backend, kernels compiled ahead of time from kernels/) and src/denoise/ (OIDN's trained weights run by our own code). The rest of the crate is the engine: its description, lights, shading nodes and starting materials, scene sync and the render thread, on the host's own Metal device. It is checked out at plugins/spectre in the Kinogaki Studio tree and builds only there.

CratePathWhat
kinogaki-spectre.The renderer and the engine, package kinogaki.spectre
kinogaki-plugin-spectreplugin/It as the plugin renders/spectre.dylib
kinogaki-spectre-testingtesting/What the GPU tests share (a dev-dependency only)

unsafe is denied rather than forbidden here, and allowed only in src/metal/sys.rs and src/metal/sys/: the Metal API through objc2-metal, and wgpu's Metal hal (sys/hal.rs).

Docs. docs/SPECTRE.md: the engine's modules, settings, outputs, sync, motion, the render thread. The renderer: docs/DESIGN.md, docs/MATERIALS.md, docs/SPECTRA.md, docs/ANODIZED.md, docs/PERFORMANCE.md; the kernels' dialect in kernels/README.md. Writing an engine in general: the root's docs/plugins/RENDER-ENGINE.md.

The host math and its tests come from luce-render, the owner's own renderer. Its shader-graph bytecode is checked word for word against words dumped by running luce-render (tools/luce_render_graphs), and its Cornell box is rendered by both renderers for a statistical comparison (tools/luce_render_cornell).

Tests, run by the root's python3 tools/check_all.py:

  • tests/tracer/: the renderer on the CPU (scene edits, trees, lights, cameras, spectra, shader graphs);
  • tests/denoise/: the Metal denoiser against the CPU reference, and both against Open Image Denoise run on Spectre's renders (hand tests, with the OIDN release Studio's tools/fetch_data.py brings);
  • the other files of tests/, mostly GPU tests (#[ignore = "gpu"], run by check_all.py --changed and --full): the engine, its lights, furnaces and closed forms, sync of each prim kind, instancing, motion, outputs, denoising, and the Cornell box against tests/references.

python3 tools/check_kernels.py compiles every kernel in every variant through glslangValidator (Vulkan 1.2 SPIR-V) and xcrun metal (MSL) on the Mac, so the Vulkan source compiles though no backend runs it yet; tool versions are in kernels/TOOLS.md.

GitHub
kinogaki/plugin-spectre (private)
Folder
plugins/spectre/
Crates
3
Rust lines
24,587 in src, 13,944 in tests

What it ships

Plugin filePackageCrate
renders/spectre.dylibkinogaki.spectrekinogaki-plugin-spectre

Crates

CrateWhat it isFilesLinesTest lines
kinogaki-plugin-spectreSpectre as a Studio plugin library (renders/spectre.dylib).150
kinogaki-spectreSpectre, the spectral path tracer, as a Kinogaki Studio render plugin.8523,33513,944
kinogaki-spectre-testingWhat Spectre's GPU tests share (a dev-dependency of the plugin's tests alone): the engine on an offscreen device, waits on its wakes, and images compared with a tolerance.61,2470

Uses

CrateRepositoryAsWhat it is
kinogaki-colorlib-colornormalColor science and color management for Kinogaki.
kinogaki-pnglib-imagenormalPNG images (ISO/IEC 15948, W3C PNG Third Edition) over kinogaki_deflate.
kinogaki-render-apiSDKnormalKinogaki's render interface: what a host (Studio) sends a render engine and what comes back, with no GPU or OS API.
kinogaki-sharedCore and the appnormalThe crates Studio and its plugins share, built once as a Rust dylib.
kinogaki-spectralib-rendernormalSpectral data and the color science hosts and engines share.
kinogaki-studio-apiSDKnormalKinogaki Studio's headless plugin API.
kinogaki-studio-api-testingSDKnormalThe SDK's test support (a dev-dependency only): assert_refused for admission tests, read_hostile for a format's tests of hostile files, format for its scratch folders and round trips, workers as a host installs them, with wgpu an ...

For its tests alone

CrateRepositoryAsWhat it is
kinogaki-harnessCore and the apptestsStudio's test harness: the real editor, its event routing and its background work, driven offscreen with only the packages a test names.
kinogaki-meshMeshtestsThe Mesh plugin: polygon modelling, Maya's and Houdini's toolset on core's editing API (plugins/mesh/PLAN.md holds the inventory and its groups).
kinogaki-mesh-kernelMeshtestsThe Mesh kernel: the heavy, robustness-critical polygon algorithms, offered to every package as verbs (kernel).
kinogaki-pnglib-imagetestsPNG images (ISO/IEC 15948, W3C PNG Third Edition) over kinogaki_deflate.
kinogaki-png-formatPNGtestsPNG, a format plugin: a PNG reads as one standard Image as the file holds it, and an Image writes as one PNG.
kinogaki-studio-api-testingSDKtestsThe SDK's test support (a dev-dependency only): assert_refused for admission tests, read_hostile for a format's tests of hostile files, format for its scratch folders and round trips, workers as a host installs them, with wgpu an ...
kinogaki-studio-ui-apiSDKtestsKinogaki Studio's UI layer for plugins.
kinogaki-testkitCore and the apptestsKinogaki Studio's core testkit: toy packages written against the SDK alone, so core is tested with no real plugin.

Third-party

CrateVersionLicenceFrozen in
block20.6.2MITlib-ui/vendor
dispatch20.3.1Zlib OR Apache-2.0 OR MITvendor
objc20.6.5MITlib-ui/vendor
objc2-foundation0.3.2MITlib-ui/vendor
objc2-metal0.3.2Zlib OR Apache-2.0 OR MITlib-ui/vendor