diff options
| author | Arman Uguray <armansito@google.com> | 2021-05-25 00:07:24 -0700 |
|---|---|---|
| committer | jeremyk-lunarg <jeremyk@lunarg.com> | 2021-06-03 14:51:11 -0600 |
| commit | 3ae088978f2107d79ac9a8eaec9ae0600f54f19f (patch) | |
| tree | d53fe651cec77493016c16fd59a5368d5ed85038 /scripts | |
| parent | 6149e30699b36901715d46a5cef8959625ef399b (diff) | |
| download | usermoji-3ae088978f2107d79ac9a8eaec9ae0600f54f19f.tar.xz | |
vkcube: Fix disturbed rotation after many iterations
vkcube computes the model matrix for the cube by repeatedly multiplying
a rotation matrix with it. After a sufficient number of iterations the
matrix becomes disturbed (likely due to numerical errors) and stops
being orthogonal and the cube vertices start scaling increasingly on the
XY plane.
* Orthonormalize the model matrix after each multiplication to prevent
the scaling.
* Use mat4x4_rotate_Y() instead of mat4x4_rotate() as it is less
verbose.
* Remove unused duplicate vkcube_vs_uniform struct.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
