Part of the Khronos Group
OpenGL.org

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
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    474
    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
    Posts
    45
    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
    Posts
    1,072
    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
  •