Spinning Shadered Cubes
attribute vec3 vertPos;
attribute vec3 vertCol;
varying vec3 fragCol;
uniform mat4 mWorl;
uniform mat4 mView; // Uniforms for the rotation, projection, and view.
uniform mat4 mProj;
void main() {
fragCol = vertCol;
gl_Position = mProj * mView * mWorl * vec4(vertPos, 1.0);
}
precision mediump float;
varying vec3 fragCol;
void main() {
gl_FragColor = vec4(fragCol, 1.0);
}