diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 15:04:01 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-27 15:04:01 -0500 |
| commit | 9c31718bc2b5be680a9021cefa1cc858012915d7 (patch) | |
| tree | ea8ab47004dc94c158dec591edbfefb7d086bd16 /runtime/shims/process.cpp | |
| parent | 1eb891134eececd9a664d6b6def4c709dd2a07a8 (diff) | |
NaN scrub: an infinity is held at 65504 with its sign, not made 0 (LEONIDA_NAN_SCRUB_INF=0: as before)
With LEONIDA_NAN_SCRUB=1 (the NVIDIA launcher's setting) the colours pixel programs write and the
floats of image stores were made 0 where they were NaN or an infinity. An infinity is the
brightest a colour can be: made 0, the brightest pixels of a picture came out the darkest. In
felicienradio/cold-project-vi, whose scrub is the same code, that was the sun's disc drawn black
(ec62312, GPL-3.0-or-later, from players' screenshots), and it holds infinities at the largest
finite half-float instead. So here: +infinity is 65504, -infinity -65504, in both forms of the
scrub (a float the program computed, and the two infinity bit patterns of 32 bits that may be an
integer's); NaN is still 0. Still nothing infinite reaches the title's bloom, blur, exposure or
temporal upscaler, which is what the infinities were scrubbed for on 2026-11-26.
Unlike cold-project-vi, values past 65504 that are finite are left as they are: 32-bit float
images go through the same scrub here, and a large finite number in one (a far distance) is data.
LEONIDA_NAN_SCRUB_INF=0 makes an infinity 0 as before. The switch is read by the translator, so
it is part of the shader cache key; the translator's source changed, so every shader is
translated again once. Not looked at in the title yet: candidates are the dark rectangles on
water under the sun and black blotches where a highlight overflows.
Test: emit::size_tests::the_nan_scrub_keeps_the_integer_bits_an_image_store_writes (run on the
RTX 4060 Ti and WARP): both infinities as bits and as products, and 0 with the switch off.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/process.cpp')
0 files changed, 0 insertions, 0 deletions