Capture sharpening and noise reduction were written in parallel and both claimed `order: 110`; the codegen refuses that, which is the guard working — two nodes at one order is an ambiguous pipeline and operation order changes the result. Resolved in noise reduction's favour, for the reason its own `placement:` block already gives: denoising is a repair and everything else in this stage is an enhancement. Sharpening or adding clarity to a noisy frame amplifies the grain along with the detail, and no later pass can separate them again. So the detail stage now runs noise reduction, capture sharpening, clarity, texture, and the other three shift up a slot to keep the multiple-of-ten convention the rest of the chain uses. Noise reduction was also missing the required `attributes:` key. The order collision aborted the build before the attribute check could report it, so it arrived looking like one fault and was two.
37 lines
1.6 KiB
YAML
37 lines
1.6 KiB
YAML
# 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
|
|
|
|
attributes: [detail]
|
|
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.
|