PDA

View Full Version : Distort Matrix?



atnak
05-20-2003, 10:04 PM
Is there a matrix I can multiply onto the modelview matrix to distort the world? I know how to shear the world, but I want something that's not uniform like shear. (For creating refractions.)

This is what I mean by distort:



Shear: (angle 'a')

----
/ /
/a /
----

Distort: (different angle 'a' and angle 'b')

-------
| /
|a /b
----

Is this possible?

Thanks.


[This message has been edited by atnak (edited 05-21-2003).]

errno
05-20-2003, 10:43 PM
i don't think this is possible, since vertex*matrix is a linear operation.
maybe you can do that using the w coordinate but i don't think it will create cool effects.
the only way i see is distord the world per triangles, using a different refraction matrix for each of them.