Page 1 of 1

Why does C3D_FVec have reversed order of components

Posted: Thu Jul 11, 2024 9:22 am
by SamoZ256
The C3D_FVec has reversed order of components (wzyx instead of xyzw), and I don't get why. The types.h has this comment before C3D_FVec declaration: /**
* @struct C3D_FVec
* @brief Float vector
*
* Matches PICA layout
*/
However, I have all my vertex data in the regular order (xyzw) and it works just fine. So why is the order reversed? Am I missing something obvious or is the comment just wrong?

Re: Why does C3D_FVec have reversed order of components

Posted: Tue Jul 23, 2024 5:14 pm
by fincs
The PICA200 expects floating point 4-component vector uniforms to be uploaded in reverse order (w z y x). For efficiency reasons citro3d defines its C3D_FVec to match the expected layout. On the other hand, vertex data is processed by the PICA200 in the usual order (x y z w).