For the final project in my computer graphics class, we created a raytracer (using ray marching). Phong shading and primitive detection is calculated in glsl.
Controls
| Left Mouse: | Pan |
|---|---|
| Right Mouse: | Rotate |
| Spacebar: | Reset Cam Position |
| Focal Length: | |
| Epsilon: | |
attribute vec2 aVertexPosition;varying vec2 vPixelCoord;void main(void) {gl_Position = vec4(aVertexPosition, 0, 1);}
var renderer = new Renderer(document.getElementById(‘canvas’),600,600,document.getElementById(‘iFocalLength’),document.getElementById(‘iEpsilon’));