X-Hax / sa_tools

Sonic Adventure Toolset
http://info.sonicretro.org/SA_Tools
109 stars 24 forks source link

Use Double for UVs to fix UV precision issues #240

Closed PiKeyAr closed 1 year ago

PiKeyAr commented 1 year ago

With the current system, converting UVs back and forth causes precision issues, e.g. 2047→converted to float→converted back to short→2046. The image below shows the original source NJA file (left) compared to the NJA output by SAMDL (right) image

This PR fixes the issue by making UVs use double instead of float to improve precision.