mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-11 08:21:37 +00:00
Step 3 of #6916. Dehaze, Clarity and Texture run as fragment passes (box, minimum and guided filters) around step 2's Shadows and Highlights, so every setting but Detail develops on the GPU with one readback. - algo: camera_raw::spatial resolves Dehaze, Clarity and Texture per frame; develop builds them the same way (130 output hashes unchanged, same speed). PerPixel gains the three stages, per_pixel() refuses only Detail, and Whites/Blacks are measured after any spatial stage. - gpu: camera_raw_filters.wgsl; the tone frame's pyramid is made on demand; plans record four segments around the main shader's passes. Dehaze's light uses two exact selections (cutoff value, then cutoff index among its ties). Its <=768 px copy comes from the CPU (Dehaze::cells, develop's own code), cached per source and white balance: on WARP the GPU's copy split CPU ties at the cutoff and moved the light by 5.7e-3. - GPU vs CPU at most 7.6e-5 (Vulkan, DX12, WARP), tolerance 1/4096. 858x572: Dehaze +40 6.0 ms vs 29 ms, Clarity +50 3.5 vs 16 ms, Texture +50 3.4 vs 10 ms, everything 19 ms vs 650-690 ms (Vulkan). Part of #6916. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>