mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 11:15:20 +02:00
Unqualified pow picks up the double overload on platforms whose <cmath> only drops the C version into the global namespace, which computes the whole thing at double precision and rounds once at the end - a different result decided by the standard library rather than by us. std::pow always gets the float overload. That's only half the problem, so there's a TODO next to it: powf isn't correctly rounded, so it differs between glibc, musl, bionic, Apple's libm and the UCRT, and all three callers feed the result into a LightCeil - which turns a one-ULP difference into a full 1/512 step in the light factor instead of letting it wash out. The PSP almost certainly uses a fixed approximation of its own; settling that against the pspautotests rendering tests is a job for once the platform differences are gone and there's a stable base to compare against. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vd8ntC2brCUtCrDJMqLbs8
To get to 100% compatibility, we will need a software renderer as there are games out there that do tricks that can't really be faked in a sensible way. Useful for homebrew too that mix sw and accel rendering.