From 7994fe1a000768b6ad21997039ab5960d4c530af Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 26 Aug 2023 14:25:30 +0300 Subject: [WGL/P] Fully implemented ray tracing --- Year 2/Computer Graphics with WebGL/Project/Project.html | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'Year 2/Computer Graphics with WebGL/Project/Project.html') 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(); -- cgit v1.3.1-26-gb76a