diff options
[WGL/P] Fully implemented ray tracing
1 files changed, 0 insertions, 14 deletions
| -rw-r--r-- | Year 2/Computer Graphics with WebGL/Project/Project.html | 14 |
diff --git a/Year 2/Computer Graphics with WebGL/Project/Project.html b/Year 2/Computer Graphics with WebGL/Project/Project.html index cf55554..fc9bae8 100644 --- a/Year 2/Computer Graphics with WebGL/Project/Project.html +++ b/Year 2/Computer Graphics with WebGL/Project/Project.html @@ -125,17 +125,6 @@ h2 { gl.canvas.height = gl.canvas.offsetHeight;
gl.viewport(0,0,gl.canvas.width,gl.canvas.height);
- // (Look at Presentation 6, Slide 21, the prespective projection diagram)
- // Since we're gonna be raycasting, we need to know where the near side is and it's
- // dimentions in our coordinate system, so we can offset the rays properly.
- // First, we pass the viewPort to convert our pixel coordinates to percentage of the
- // screen.
- gl.uniform2f(uViewPort, gl.canvas.width, gl.canvas.height);
- w = 2 * Math.tan(PERSPECTIVE_ANGLE / 360 * Math.PI) * PERSPECTIVE_NEAR;
- // The height of the near wall is determined by the aspect ratio.
- gl.uniform2f(uPerspSize, w, gl.canvas.height / gl.canvas.width * w);
- gl.uniform1f(uPerspDist, PERSPECTIVE_NEAR);
-
drawFrame();
}
window.onresize = resizeglcanvas;
@@ -146,9 +135,6 @@ h2 { lookUpdate();
gl.uniform3fv(uEye, pos);
- gl.uniform3fv(uEyeForward, forward.toCartesian());
- gl.uniform3fv(uEyeUp, up.toCartesian());
- gl.uniform3fv(uEyeLeft, left.toCartesian());
skybox.draw();
star.draw();
|
