KillzXGaming / Switch-Toolbox

A tool to edit many video game file formats
GNU General Public License v3.0
971 stars 155 forks source link

Fix wrong UV map being used to generate tangents on TOTK #644

Closed MediaMoots closed 1 year ago

MediaMoots commented 1 year ago

Currently the toolbox does not consider which UV map should be used for generating tangents, this PR fixes it.

It reads the value in o_texture2_texcoord from the material and uses the corresponding UV for tangents. Some meshes in TOTK even use UV2 for normals so a more scalable solution was needed rather than just a bool.