CSC470: Homework 3


Upgrade HW2 by doing matrix transformations inside the vertex shader. The rotation now should be applied to each square separately, meaning each square should rotate around its own center, rather than the global origin. Everything else (the slider, button, canvas click) should remain on the page and preserve its functionality. Make sure you apply the angle calculation and matrix multiplications inside the shader, as opposed to your javascript.

If you are brave, you can use quarternions for the rotation. You don't have to: a simple rotation matrix around Z will work well here.

Submit your code to the respective dropbox in Blackboard. It won't hurt to upload it somewhere, too, and put the link in the submission comments.