GLSL Vertex Shader Rotation Fix

Job ID: 37737733

Budget: €30 – €250 EUR

I need to rotate and scale UVs in a vertex shader such that the rotated texture fills its available bounding box. The following test implementation successfully rotates and auto-scales the texture but the image gets skewed / distorted as the rotation value increases:

https://jsfiddle.net/2m0skaqt/

Please apply if you can identify the issue and fix the vertex shader so that the test above rotated and scales the image without distorting it.
Related categories: JavaScript OpenGL Three.js