Graphics Reference
In-Depth Information
Case
Matrix/TBN
Quaternion
Measured Value
ALUs
Memory
ALUs
Memory
VS PS
VS PS
Pipeline Stage
VS
PS
VS
VS
PS
VS
Normal Mapping
15
12
7
7
13
12
4
5
Instancing (Scale+Rot)
15
-
20
-
21
-
12
-
Skinning
33
-
64
-
71
-
16
-
Tab l e 1. 2. Comparison of 3 × 3 rotation matrices/TBN and quaternions performance (in
ALUs) and memory footprint (vertex attributes (TBN, instance data)/vertex texture
fetch (skinning) size in bytes (VS)/interpolator channels count (VS PS)).
1.10 Conclusion
In this chapter we tried to fully cover our experience with quaternions. We have
used quaternions throughout the whole engine, significantly reducing memory
and bandwidth costs. There are, however, certain pitfalls, which we described,
that we hope will not prevent quaternions from replacing matrices in modern
engines.
1.11 Acknowledgements
The authors would like to thank Victor Surkov for helping with the illustrations
for this chapter.
Bibliography
[Hejl 04] Jim Hejl. “Hardware Skinning with Quaternions.” In Game Program-
ming Gems 4 , edited by Andrew Kirmse, pp. 487-495. Boston: Cengage
Learning, 2004.
[Lengyel 11] Eric Lengyel. Mathematics for 3D Game Programming and Com-
puter Graphics , Third edition. Boston: Cengage Learning PTR, 2011.
[Malyshau 12] Dzmitry Malyshau. “A Quaternion-Based Rendering Pipeline.”
In GPU Pro 3 , edited by Wolfgang Engel, pp. 265-273. Boca Raton, FL: A
K Peters/CRC Press, 2012.
[Mikkelsen 10] Morten S. Mikkelsen. “Bump Mapping Unparametrized Surfaces
on the GPU.” Journal of Graphics, GPU, and Game Tools 1 (2010), 49-61.
[Mittring 08] Martin Mittring. “Advanced Virtual Texture Topics.” In ACM
SIGGRAPH 2008 Games , pp. 23-51. New York: ACM, 2008.
[Schuler 06] Christian Schuler. “Normal Mapping without Precomputed Tan-
gents.” In ShaderX5: Advanced Rendering Techniques , edited by Wolfgang
Engel, pp. 131-140. Boston: Cengage Learning, 2006.
Search WWH ::




Custom Search