An earlier commit claimed to move `film_sim` from `[tone, colour]` to `[effect]` and did not. It edited `ops/film_sim.yaml`, where `attributes:` is read, validated against the vocabulary, and then dropped: a `rust:` node publishes its own descriptor, and the type still said tone and colour. The stock went on appearing in the Light group beside exposure and again in Colour beside white balance, exactly as before, and every test passed. Nothing caught it because nothing could. The declaration parsed, the parity tests compare ids rather than attributes, and an operation filed under the wrong groups renders perfectly. It surfaced only on screen, as a missing Effects tab — which is indistinguishable from a category that genuinely has nothing in it, and is precisely how `Optics` looked for as long as it was empty. So three changes rather than one: `FilmSim`'s descriptor declares `Attribute::Effect`, which is the move the earlier commit described. `attributes:` joins the keys a `rust:` node may not carry, beside `params`, `uniforms`, `wgsl`, `helpers`, `define` and `label`. The rule was already written — "its descriptor comes from the type" — and attributes were the one field that slipped past it. A key that is silently ignored is worse than one that is rejected, because it reads as though it worked; the eight hand-written declarations lose a line that never did anything. And a test asserts that every attribute the chain carries reaches the tab strip. That is the property that was actually broken, and its failure mode is invisible from every direction: the controls exist, they are in the shader, and there is no way to filter to them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
36 lines
1.6 KiB
YAML
36 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
|
|
|
|
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.
|