I'm following Jeff Lait's OpenCL masterclass (https://vimeo.com/241568199) and trying to understand some matrix maths a bit better. I'm familiar with using them in VEX but without much of a grasp of the underlying theories.
In the example looking up a volume and setting point colour depending on the result (approx 1:04:50) he multiplies the x y and z components of the point position by separate rows of a transform matrix, specifically the x component by the bottom row, the y by the second from bottom row and the z by the second from top.
I tried replicating this is VEX just because easier to output debug attribs and to do the same thing I need to reverse the row order ie multiply P.x with the TOP row, P.y by the second from top etc.
Can someone tell me are matrices in OpenCL just upside down compared to VEX?
A float4 in OpenCL is laid out in memory as xyzw. .lo refers to the front half of the vector, so xy, and .hi to the back half, or zw.
The same is with float16, so .lo is the first 8 floats in memory, and .hi the next 8 floats.
The second .hi / .lo then further grabs the first 4 floats or last 4 floats of those setups.
Thus .lo.lo refers to the FIRST four floats in memory. This is what would normally be called the "top row", row zero and columns zero through three. So I think OpenCL is already doing what you expected in VEX.