WebGL Example: Phong / Blinn Phong Shading

The JavaScript source of this example is: renderer.js
If you do not see an output below, your browser does not support WebGL. The WebGL shader code is slightly different from the GLSL code (version 1.4 ) that is used in the lecture. This is because WebGL shaders must conform to the OpenGL ES Shading Language (Version 1.0) which can be found here.

Your browser does not support the canvas element
Edit the shader code below and click on the button to see the result:

Vertex shader:

Fragment shader:

Note: The interface on this website is kept very simple. If you are looking for a more advanced online GLSL editor that allows uploading own 3D meshes and can handle custom uniform variables, the GSN Composer might be of interest.
Blinn-Phong Shading: Open example in the GSN Composer