Back to Parent

The Shader

At this point, I needed to do something to each of these faces. I had never written a shader before, but my instructor was immensely helpful in getting me through the process. There are two parts:

A vertex shader that applies data to every vertex in an object. 

A fragment shader that takes depth and color data and outputs this data applied to a fragment for the next stage of the graphics pipeline. 

The entire scene is rendered using Mozilla's A-frame VR framework. In A-frame, shaders can be registered and implemented in a scene. The code below is the shader I used for this project. It is written in WebGL, a javascript API that compile into GLSL (OpenGL Shader Langue), a C-like language that handles data in the graphics pipeline of the rendering process. 

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!