View Full Version : Matrix Tranforms

06-24-2002, 01:52 PM
Lets say that there are 1000 objects in a scene, all visible, which are translated by a single modelview matrix, which is NOT the identity.

Do you get anything at all out of doing the math 1 time, by changing the actual geometry, and replacing the modelview matrix with the identity?

There are no pushing-popping issues here, since it all uses the same matrix.

What I really want to know is, do graphics cards handle geometry through an identity faster than through another transform? Are they smart enough to not multiply by 1 and add 0 ?


06-24-2002, 02:02 PM
I doubt it(and I hope not).Transforming is a simple process:
(1) get untansformed vertex
(2) multiply by transforamtion matrices

adding something like:
(2a) if the M=I(which needs 16 compares) don't multiply
just complicates the whole thing w/o getting you anything.The gain you get in the rare cases where M=I you loose in all the other cases where you need 16 comapres.Plus it messes up the code etc.,etc.

[This message has been edited by zen (edited 06-24-2002).]