gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Geometry Engine

#94330 - tciny - Mon Jul 24, 2006 1:07 pm

I have a question regarding the infos at http://www.bottledlight.com/ds/index.php/Video/GeometryEngine.
All the widths are 32bit when in reality things like e.g. GFX_NORMAL require all three components compressed into one 32bit integer.

So my question is this:
When I send data to MATRIX_MULT4x4, what input does it actually require? I just find it kind of weird that MATRIX_LOAD4x4 requires 32bit floats when vertices are stored the v16 format.
Is there a way to set the matrices using v16 values? and does this apply to MATRIX_TRANSLATE and MATRIX_SCALE as well?

Best regards

#94457 - crossraleigh - Mon Jul 24, 2006 9:55 pm

The matrix registers accept 20:12 fixed point, not floating point. Vertex coordinates also use 12 bits for the fraction part, so if you want to write vertices to the matrix registers, just make sure you extend the sign and you should be fine.