mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
16- and 32-bit documents get an Rgba16Float canvas texture when the adapter can sample, filter, render to and copy it (Rgba8Unorm stays for 8-bit documents, as the fallback, and for high-bit documents over 100 MP, about 1.07 GB with mips), so smooth gradients no longer band through 8 bits. Both the wgpu compositor path (encode pass with 16F pipelines; no upper clamp) and the CPU band/rect upload path (f32 -> half conversion, reused band buffer) write it. The 32-bit preview (exposure/gamma) moves into the canvas shader, before the colour-management/proof LUT, so values above 1.0 are exposed into range instead of clipped. GpuCanvas::read_texels / texture_info for tests and benchmarks; PHOTOCRAFT_CANVAS_F16=0/1 disables the float canvas / ignores the budget. large_image_bench gains --depth 16|32. Co-Authored-By: Claude Opus 5.5 <[email protected]>