Rounding toward zero never produces infinity from a finite value: past the f16 range the result is +-65504. We truncated the mantissa and let packHalf2x16 round, so large values became infinite. Silent Hill's deferred lighting packs title-menu values past 65504; its height fog then multiplies scene color by a tiny transmittance, which keeps 65504 finite but leaves an infinity infinite, a later pass turns it into NaN and the whole 3D menu background renders black. Subnormal results now also keep whole 2^-24 steps. A MoltenVK device test covers overflow, truncation, subnormals, NaN and inf. |
||
|---|---|---|
| .. | ||
| SharpEmu.CLI | ||
| SharpEmu.Core | ||
| SharpEmu.DebugClient | ||
| SharpEmu.Debugger | ||
| SharpEmu.GUI | ||
| SharpEmu.HLE | ||
| SharpEmu.LibAtrac9 | ||
| SharpEmu.Libs | ||
| SharpEmu.Logging | ||
| SharpEmu.ShaderCompiler | ||
| SharpEmu.ShaderCompiler.Metal | ||
| SharpEmu.ShaderCompiler.Vulkan | ||
| SharpEmu.SourceGenerators | ||