Raytracing in WebGL

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.


Left Mouse: Pan
Right Mouse: Rotate
Spacebar: Reset Cam Position
Focal Length:

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’));

Leave a Reply

Your email address will not be published. Required fields are marked *


WordPress Anti Spam by WP-SpamShield