2012-08-02 07:52:30 by Homer in Daily Zombie

I knew that I could pass World and View transforms to the (current) shader as a Dual Quaternion (ie two vec4's), but I thought that I would be stuck with passing the Projection transform as a traditional 4x4 matrix.

Today I learned that it is indeed possible for me to pass a Projection transform as a homogenous vec4.
This is a ground breaking development - I can ELIMINATE ALL MATRICES AND THEIR MATH both on the cpu and the gpu !!!

I always secretly hoped this was so, but only today was I convinced.
I offer the following quote:

"Perspective should not be used as a regular object transform. It's performed in separate stage when we need to project the world on the camera/light. This transformation also uses homogeneous vector representation, while other transformations don't. Therefore, it's a right decision to move the perspective out of spatial transform capabilities. In order to produce it we just need to pass the tan(fov/2) value to the shader and apply it manually for W component computation of gl_Position variable."


0 people liked this topic

 About me

I started screwing around with computers when I was nine, the same year I was first arrested for breaking into the local high school to play with the musical instruments.

Since then I have learned to program robots the size of houses with up to seven independent axes, as well as design and build the robot itself.

These days I am back at Uni, getting myself qualified in game programming as a formality.

Do you like zombies?


 Homer


*****

 Messages: 4617
 Topics in blog: 180

    

 Categories


 Views

24163