← Field notes

Preserving color when Chiado adds Texture

A channel-wise detail calculation preserves blue in a traced pixel, with 360 improved Texture increments in the follow-up check.

Conor Livingston · October 2026

Recorded blue-channel values before and after clipping. The two residual calculations lead to black or blue; this trace does not establish which result is preferable.
Recorded blue-channel values before and after clipping. The two residual calculations lead to black or blue; this trace does not establish which result is preferable. Open full-size figure ↗

Adding local detail should not unexpectedly turn an already blue pixel black. One Chiado Texture trace showed exactly that: a brightness-only residual drove the pixel’s target below zero, and clipping removed its blue channel.

The replacement computes detail residuals separately for red, green and blue. In the traced example it preserves a blue output. In the later intermediate-setting check, all 360 conditional Texture responses improved on the comparison diagnostic; 351 complete edits improved and nine regressed. After reviewing those nine and passing the engine, iPad simulator and shared Mac checks, we integrated the frozen candidate. The investigation below explains both the fix and its limits.

The detail that a brightness measurement misses

A simple local-detail operation subtracts a blurred image from the original. That difference describes variation smaller than the blur's neighborhood. Adding some of it back strengthens local variation; subtracting it softens variation.

But an RGB image has three channels. We can calculate one brightness difference and use it to scale all three channels together. Or we can calculate a separate difference for red, green and blue. These operations need not agree on a colored edge, even when they use the same blur and the same strength.

Our existing Texture operation used the first approach. The candidate used the second, retaining the existing radius, amount and attenuation from noise reduction. It introduced no coefficients chosen separately for particular hues, photographs or ISO settings.

The motivation came from separating the error measurement into its components. Fine color-variation terms contributed about 58% of the squared Texture-response error at native resolution and 80% in previews. Those percentages describe the diagnostic's weighted terms. They are not estimates of how much of the visible problem was caused by color.

Follow the blue pixel

In one preview, the input to the detail stage was already almost pure blue: approximately RGB (0, 0, 0.968), on a scale where 1 is the output white endpoint. Its weighted brightness was only 0.070, while the blurred neighborhood's brightness was 0.445.

At the tested Texture setting, the scalar operation added 0.2 times the brightness difference. The target became approximately −0.005. Scaling the original RGB toward that negative target made its blue channel negative, too. Clamping the output to its permitted range produced black.

The channel-wise version compared blue with the neighborhood's blue value, approximately 0.682. It raised blue to about 1.025, which clipped to 1. Red and green remained below zero and clipped to zero. The result was blue.

OperationBefore output clippingDisplayed result
Scalar brightness residualBlue ≈ −0.071Black
Separate RGB residualsBlue ≈ 1.025Blue

This explained the large change without an integer overflow or a corrupt file. It also prevented a misleading diagnosis: the candidate had not created the original blue input at that location. Bright-window color fringes were already present in the baseline renderer. Tracing one pixel did not establish which result was preferable, explain every changed pixel, or resolve the baseline mismatch with Lightroom.

An average can improve while another control gets worse

The candidate reduced mean Texture-response error by about 17% in native crops and 31% in previews. All 144 conditional Texture comparisons improved. However, the measured increments from noise reduction worsened on average: about 1% native and 18% in previews. The preview noise-reduction error started much smaller, so those percentages should not be compared as equal-sized visible changes.

These measurements ask different questions. A combined edit may move closer to Lightroom while changing how much another slider contributes. An editor needs scrutiny of both the final result and the response to the next adjustment.

Clipping counts were mixed, too. Using consistent nominal eight-bit quantization and comparing each renderer with its own baseline, average any-channel endpoint mismatch increased in native crops but decreased in previews. A pixel reaching a channel endpoint does not by itself prove visible detail loss. Different starting profiles further complicate the comparison.

The checks that follow the promising number

Texture-zero images remained pixel-identical. Synthetic tests checked flat colors, neutral detail, small slider steps and repeatability. Export tests checked that changing the rendering band height did not create seams and that zoomed regions agreed with the corresponding parts of the full render.

Those checks cover specific failure modes. They do not establish that colored noise, clipping or every combination with curves, grading and Dehaze behaves well. We therefore froze the candidate and prepared intermediate Texture settings on several edit backgrounds, keeping the untouched October reserve closed.

Follow-up: intermediate settings and combined edits

Intermediate Texture response error falls 24.27 percent in 240 native cases and 36.64 percent in 120 preview cases; 351 complete edits improve and nine regress.
Later measured check at Texture ±25 and ±75, across five edit backgrounds on six consumed development photographs. All 360 Texture increments improved. Open full-size chart.

The follow-up used 450 Lightroom references and 900 renderer outputs. Of 360 changed complete edits, 351 improved and nine regressed. We reviewed all nine regressions, kept the native endpoint and background-interaction limitations in the record, and integrated the frozen candidate after engine, iPad simulator and shared Mac checks. The 90 zero-Texture pairs remained identical. A three-run Mac command-line benchmark increased from 0.506 to 0.612 seconds; that is not iPad interaction latency. The October reserve remains unopened.

The broader lesson is to trace an alarming difference before naming its cause. A full-range pixel change can expose a limitation in the old algorithm, a problem in the new one, or both. A favorable average cannot make that distinction for us.

Related: testing slider combinations, preview and export consistency, and keeping development evidence separate from final evaluation.

What this changes for Chiado

Chiado now uses the channel-wise Texture calculation from this accepted experiment. The traced failure explains why that change matters, while the broader checks cover intermediate strengths, edit backgrounds and zero-Texture stability. The 90 zero-Texture pairs stayed identical. Existing blue fringes, endpoint mismatches and some background interactions remain separate issues; preserving this pixel’s blue is not proof that every colored edge is correct.