WebGL Example: Phong / Blinn Phong Shading

This website is a part of the Graphics Programming lecture at the University of Marburg. The JavaScript source of this example is: renderer.js

There is also a newer WebGL 2.0 version available.

Information on Phong and Blinn Phong shading can be found in these lecture slides. Furthermore, there is a detailed video tutorial on Blinn Phong shading.

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