Skip to content

fix: Print Density Target acts only under Auto Density - #1488

Merged
marcinz606 merged 1 commit into
mainfrom
fix/print-density-target-auto-only
Oct 23, 2026
Merged

marcinz606 merged 1 commit into
mainfrom
fix/print-density-target-auto-only

Conversation

@marcinz606

Copy link
Copy Markdown
Owner

Problem

The Print Density Target (Set Targets) changed the render of frames with Auto Density off. anchor_target_density also set the fixed curve geometry: the manual exposure pivot, the paper S-curve centre, the Zone Density, Split Grade and regional CMY centres, and the slide path's zone geometry.

Fix

  • A new fixed constant, reference_print_density (0.75), holds the curve geometry on CPU and GPU, for prints and slides. No WGSL change.
  • anchor_target_density is read only where a metered anchor is placed: compute_pivot and Shadow Reach, through _anchor_linear_value. It inverts the midtone gamma, so the anchor prints exactly at the target.
  • auto_sliders._density_shift includes the target term, so the shown and baked Density print the same as Auto Density.
  • The saved exposure_targets key is unchanged, so no migration is necessary.
  • THUMBNAIL_RENDER_VERSION goes from 15 to 16, because pixels change for installs with a retuned target. At the default target, no render changes.

Behavior change

With Auto Density on and a retuned target, the target now moves only the exposure. The S-curve and zone centres stay at 0.75. Before, they moved with the target.

Known limit

With Cast Removal off on a crossover paper, a bake at a non-default target leaves R/B off by (v_t − v*)·(1 − s_ch/s_g). One Density slider cannot hold a shift that depends on the slope of each channel. This is exact at the default target and with Cast Removal on.

Tests

  • New: the target has no effect with Auto Density off (this test failed before the fix). A metered anchor prints at a retuned target. The shown slider values still reproduce the auto print at a retuned target.
  • The affected suites pass, CPU/GPU parity included (532 passed). Lint and type check are clean.
  • Headless app run on samples/06.raw: with Auto Density on, a target of 0.95 darkens the frame. With it off, the render is pixel-identical.

anchor_target_density also set the fixed curve geometry: the manual
exposure pivot, the paper S-curve centre, the Zone Density and regional
CMY centres, and the slide zone geometry. A retuned target so changed
frames with Auto Density off.

A fixed reference_print_density (0.75) now holds the geometry. The
tunable target is read only where a metered anchor is placed
(compute_pivot, Shadow Reach), and the auto Density slider value folds
it in so a bake prints the same. The saved key is unchanged.
THUMBNAIL_RENDER_VERSION 15 -> 16 for installs with a retuned target.
@github-actions

Copy link
Copy Markdown

Preview load metrics (github-linux-x64)

format cold load throughput
CR2 0.622 s 36.05 MPx/s
NEF 0.513 s 47.96 MPx/s
ARW 0.189 s 107.01 MPx/s
RAF 1.831 s 8.88 MPx/s
DNG 0.543 s 44.08 MPx/s

fixtures: rawsamples.ch · sha: 7580b8d · full JSON

@marcinz606
marcinz606 merged commit e5fde7d into main Oct 23, 2026
2 checks passed
@marcinz606
marcinz606 deleted the fix/print-density-target-auto-only branch October 23, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant