upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/binary_occlusion.comp
diff options
context:
space:
mode:
authorBetterJdue <BetterJdue@users.noreply.github.com>2026-11-22 03:23:12 +0100
committerBetterJdue <BetterJdue@users.noreply.github.com>2026-11-22 03:36:22 +0100
commit178a4b47fff93cec0b34954c9d535145d845fd73 (patch)
treeeebba4c8ccc088651adc405f2eb4ab9ed456819f /runtime/src/binary_occlusion.comp
parent67204bf8c0471335d9046890288b33e8d5e2875b (diff)
SHADER-86 follow-up: correctly rounded UNORM/SNORM decode with integer ops; add 8_SNORM, 16_SNORM, 8_8_SNORM
OpFDiv is allowed 2.5 ULP, and on an RX 6700 (AMD Windows 26.11.2) and an RTX 5090 it returns the reciprocal-multiply bits, so #599's decode was only correctly rounded in the CPU model (8_UNORM 130/256 exact on the RX 6700). x/(2^n-1) in binary is x's n bits repeated, so a 64-bit multiply by the repeat pattern, FindUMsb and the round bit give the correctly rounded f32 with integer ops only; the tail never ends, so there are no ties. SNORM uses the same on the magnitude with n-1 bits; the most negative code is -1.0. Formats 2 (8_SNORM), 8 (16_SNORM) and 15 (8_8_SNORM) were missing from FORMATS and decoded to 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/binary_occlusion.comp')
0 files changed, 0 insertions, 0 deletions