Update packed normals implementation to match F3DEX3 beta#567
Update packed normals implementation to match F3DEX3 beta#567Lilaa3 merged 3 commits intoFast-64:mainfrom
Conversation
I don´t think export side stuff applies to tiny3d? |
|
This is indeed completely independent of tiny3d. Or more generally, any mesh conversion refactors in f3d can be done without worrying about t3d, |
Yanis002
left a comment
There was a problem hiding this comment.
sorry for the late review, code looks fine to me and it exports properly for OoT with my scene (though it crashed in-game but there's a very high chance I missed something I need to do in HackerOoT with the new updates)
I opened a PR for HackerOoT earlier to update the patches HackerN64/HackerOoT#180, not sure about HackerSM64 though |
The ReuniteVersions branch of F3DEX3 has been merged, putting it in beta.
The only change to the microcode which requires a fast64 change is that packed normals (normals encoded in the unused 16 bits of each vertex) have been changed from octahedral encoding to a simple 5-6-5 bit encoding. The latter was created by HailToDodongo and is used in Tiny3D. As discussed in the F3DEX3 documentation https://hackern64.github.io/F3DEX3/removed.html :
This PR adds the new encoding as well as an option to use the new or old encoding, which defaults to the new one. This option is included in case people are developing romhacks on older F3DEX3 versions and don't want to update yet. It's also included because HailToDodongo's Tiny3D external export tool converts the octahedral encoded normals to 5-6-5 encoding; he'll need to simply remove that conversion from his tool, but until he does that, fast64 directly using the 5-6-5 encoding will corrupt Tiny3D meshes.
This is tested with a variety of demo meshes using packed normals in OoT.