Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Alternative to a matrix stack

  1. #11
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Quote Originally Posted by chbaker0 View Post
    What is your recommendation then? Do you think it is a better idea all around to do matrix computations in single or double precision?
    How many matrices are you going to multiply in order to get the final result which is passed to the shader? As a rough guide, assume that each matrix multiply will cost you two bits of precision.

    Also, if you update matrices incrementally (moving/rotating objects by multiplying their current transformation by a "delta" matrix each tick), the matrices will decay over time (i.e. orthonormal matrices will slowly cease being so). They will decay more slowly if you use double precision, but if their lifetimes can last for hours, you will need to re-normalise periodically.

  2. #12
    Intern Newbie
    Join Date
    Dec 2013
    I'm not updating incrementally, so that won't be a problem for me. However, losing precision for every matrix multiplication could conceivably be an issue, as each node's relative transform matrix will be multiplied by each of its children's. Perhaps it would be a good idea for me to use double precision for that.

  3. #13
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Never hesitate to use double precision for the calculation on the CPU.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts