# A hand-written node. `rust:` names the type in `crate::ops` that implements # `Operation`; its descriptor, its parameters and its passes come from that # type rather than from this file. It appears here anyway because `ops/` is # where the pipeline's order is written down, and an order kept half in YAML # and half in Rust would be worse than either alone. id: clarity order: 130 rust: Clarity why_rust: | A neighbourhood operation. Clarity is defined by what the pixels around a pixel are doing, and the schema above describes a function of one colour — `wgsl:` is handed `c` and no coordinate, which is the wall the detail stage exists on the other side of. It declares `Affects::Detail` and returns two `DetailPass`es: a Gaussian of log luminance along each axis, the second of which also applies the mask. A kernel is also not four facts. Stretching this schema to express a truncation rule, a soft limit and a midtone taper would produce a worse language than Rust, aimed at one caller. placement: | In the detail group, after noise reduction and before sharpening. Order inside the group is not arbitrary. Clarity multiplies local contrast, so it multiplies noise with it — running it before noise reduction would ask the denoiser to remove grain that clarity had already amplified into structure. And capture sharpening belongs last, on the picture as it will finally be, so that the acutance a photographer judges at 1:1 is the acutance in the file. Before texture, which is a decade finer: coarse before fine, so the fine control's base is computed on the modelling the coarse one has already settled.