mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 02:30:15 -06:00
New L3 crate `lightcraft-gpu`: a wgpu device (Metal/Vulkan/DX12; none on wasm32), WGSL kernels compiled once, buffer/dispatch/readback helpers, and a renderer that runs the per-pixel stage (tone map, highlights/shadows, clarity/texture/sharpen, dehaze, local mask terms, OkLCh colour ops, grading, vignette, gamut map, sRGB encode, curves, grain) on the device. Earlier stages still run on the CPU and are uploaded (per-stage hybrid). Stage results are cached per view next to the CPU StageCache (new `StageCache::extension`). The CPU pipeline stays the oracle and shares its resolved parameters with the kernels: `finish::FinishParams` / `mask_terms`, `pipeline::plan` (stage-cache keys), `local::plane_sigmas` / `nr_params` / `wb_matrix_for`, exact LUTs and OkLab matrices exported for the shader prelude. Equivalence tests (skip without an adapter): mean |d| < 0.5 LSB, max <= 3 LSB; measured max 1 LSB on Apple M4 Pro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
920 B
TOML
28 lines
920 B
TOML
[package]
|
|
name = "lightcraft-gpu"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "LightCraft GPU develop pipeline: wgpu compute (WGSL) twin of the CPU pipeline, which stays the reference (L3)"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
lightcraft-geom = { workspace = true }
|
|
lightcraft-color = { workspace = true }
|
|
lightcraft-raster = { workspace = true }
|
|
lightcraft-develop = { workspace = true }
|
|
lightcraft-pipeline = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
# Native only: Metal / Vulkan / DX12 through wgpu (pure Rust; the drivers are the system's).
|
|
# The browser build keeps the CPU pipeline (WebGPU needs async device creation: see docs/gpu-pipeline.md).
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
wgpu = { workspace = true }
|
|
pollster = { workspace = true }
|
|
bytemuck = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
lightcraft-scenes = { workspace = true }
|