The second half of D20: a camera_profile scene operation at order 25 that converts working colour into linear ProPhoto, runs the DNG SDK's HSV lookup through the HueSatMap and then the LookTable, and converts back. Hue and saturation do not change under the uniform gains before it, so a 2.5-D HueSatMap gives the same answer as straight after the matrix, and the look sees the photographer's exposure as it does in the SDK. Two departures for scene-referred values: value is not clamped on the way out, and a colour outside ProPhoto passes through. The operation holds only the switch (on by default) and a look strength of 0-200 %. It is composed while the switch is on — a new Operation::composes() separates "does something" from "moved from the defaults", so an untouched raw renders through its profile and still writes nothing. The tables come from the source: dr-gpu uploads the ones DemosaicedImage carries into a storage buffer at @binding(8), whose two-entry header tells the fragment whether there is anything to apply, and binds a header of zeros for every other source. apply_reference is the lookup on the CPU. The GPU test holds the shader to it over 256 colours, through synthetic tables strong enough that a wrong index shows, and through the library's real Adobe Standard tables when the 6D DNG is present.
20 lines
866 B
YAML
20 lines
866 B
YAML
id: camera_profile
|
|
order: 25
|
|
# A `rust:` node publishes its own descriptor; its attributes are on the type
|
|
# in `../src/ops/camera_profile.rs`.
|
|
rust: CameraProfile
|
|
|
|
why_rust: |
|
|
It reads the source's profile tables from a storage buffer no declaration can
|
|
name, and it is composed at its defaults — a raw whose profile is on is
|
|
rendered through it without the photographer having touched anything —
|
|
which a declared node cannot say (D20).
|
|
|
|
placement: |
|
|
After exposure, before contrast (D20, camera-profiles.md §3). Hue and
|
|
saturation do not change under the uniform gains before it, so a 2.5-D
|
|
HueSatMap gives the same answer here as straight after the matrix; and the
|
|
LookTable sees the exposure the photographer chose, as the DNG SDK's does.
|
|
Contrast, tone and the colour controls then act on the profiled colour, as
|
|
they do in Camera Raw.
|