Transforming batch of vector 4 float using simd
I am writing a rasterizer which executes on the cpu. The first stage of the pipeline is to take the vertices of the model and transform them to screen space. Backface culling is also done somewhere. I had an idea. What if instead of doing matrix vector multiplication, transforming one vertex at a time, i pack 4 vectors into a 4 by 4 matrix and transform them 4 at a time. To get this to work i pack the transform matrix as column major and pack the 4 vectors into a row major matrix. Currently my vectorized code for multiplying a 4 by 4 matrix by another 4 by 4 matrix performs about the same as a
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.