devkitPro / libogc

C Library for Wii and Gamecube homebrew
https://devkitpro.org/viewforum.php?f=40
Other
286 stars 70 forks source link

gu: add a function to multiply 4x4 matrices #172

Closed mardy closed 6 months ago

mardy commented 6 months ago

Add guMtx44Concat() in both C and PS variants. The PS variant is more than 3 times faster that the C one; it's written in a separate file (and not in gu_psasm.S) because it uses a different naming of the matrix registers.

These functions are especially useful when porting programs written for OpenGL, which uses 4x4 matrices.

mardy commented 6 months ago

Tested and benchmarked with https://gitlab.com/mardy/benchmark-wii