Second Shader Experiment

A second WebGL experiment

This program draws a square in the lower left corner of the screen. But the shaders take care of moving it, coloring it, and making it be less square.

The web page loads loadShaders script, and the main script.

There is a vertex shader and a fragment shader. fragment shader

Looking at this program should give you an idea of how to use WebGL to set up shaders, and to pass information to the shaders.