Index of WebGL Projects

Over the summer of 2018, Henry created several WebGL projects. These were all intended to learn how to use WebGL, so the source of each is very messy. Writing messy code at first can be great for learning! None of these are intended to be more than a demonstration of what can be done with WebGL -- lighting scenes, filtering images, and rotating objects.

WebGL provides fast, graphics-proccessing-unit accelerated controls. These can be used to generate 3D graphics, filter images, or even graph a function.

To generate an image using WebGL, vertex-shaders and fragment-shaders are created an run on the graphics-processing-unit. The vertex-shader applies matrix transformations to a list of vertices -- translating each vertex. All projects included use the "GL.TRIANGLES" option to render triangles using every three vertices as vertices for the triangles. The fragment-shader is then run for every pixel to be displayed in each triangle, determining the color of each pixel. Information can be given to both the vertex and fragment shaders. For example, the location of a light source and the location of the camera are given to the vertex and fragment shaders in this WebGL program, to calculate the intensity of lighting for a point on a triangle.

Refrences

This tutorial was used to learn WebGL.