Skip to content

Preserve NaN in HDR diagnostic captures - #686

Closed
DoubleD17 wants to merge 1 commit into
fxceless:mainfrom
DoubleD17:fix/preserve-hdr-capture-nan
Closed

DoubleD17 wants to merge 1 commit into
fxceless:mainfrom
DoubleD17:fix/preserve-hdr-capture-nan

Conversation

@DoubleD17

Copy link
Copy Markdown

Preserve NaN when decoding HDR channels with exponent 31 and a nonzero mantissa. In the synthetic RGBA buffer for R16G16B16A16_FLOAT and R11G11B10_FLOAT, NaN maps to 0, positive infinity saturates to 255, and the finite control 0.5 still maps to 202 through the fork's cube-root curve. Adapted from DoubleD17's original fix. Marvisak #2052

Synthetic CPU capture tests on Windows 11 x64 with Rust 1.98.1 MSVC passed two of five on the base with the same fixture and five of five on candidate 8a77f97. They exercise conversion through the RGBA buffer. PNG writing and GPU readback were outside the test.

AI-assisted.

@DoubleD17 DoubleD17 closed this Nov 26, 2026
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