From 633ffb4cc6580c5809a8d1d665f2bd4b2be94b1f Mon Sep 17 00:00:00 2001 From: Caballo <63630491+CaballoMa@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:29:23 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index aa0f112..c16e488 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,8 @@ # lab06-debugging -# Setup +Shader Link: https://www.shadertoy.com/view/cd3yz2 -Create a [Shadertoy account](https://www.shadertoy.com/). Either fork this shadertoy, or create a new shadertoy and copy the code from the [Debugging Puzzle](https://www.shadertoy.com/view/flGfRc). - -Let's practice debugging! We have a broken shader. It should produce output that looks like this: -[Unbelievably beautiful shader](https://user-images.githubusercontent.com/1758825/200729570-8e10a37a-345d-4aff-8eff-6baf54a32a40.webm) - -It don't do that. Correct THREE of the FIVE bugs that are messing up the output. You are STRONGLY ENCOURAGED to work with a partner and pair program to force you to talk about your debugging thought process out loud. - -Extra credit if you can find all FIVE bugs. - -# Submission -- Create a pull request to this repository -- In the README, include the names of both your team members -- In the README, create a link to your shader toy solution with the bugs corrected -- In the README, describe each bug you found and include a sentence about HOW you found it. -- Make sure all three of your shadertoys are set to UNLISTED or PUBLIC (so we can see them!) +Bug1: Apparently vec to vec2. +Bug2: In raycast(uv2, dir, eye, ref); we use uv2 instead of uv, uv2 transfer the orignal position to (0,0). When we use uv, the coordinate is wrong. +Bug3: In H *= len * iResolution.x / iResolution.y; We should / iResolution.y instead of iResolution.x. Cuz we want to generalize the length to the screen size. +Bug4: In dir = reflect(dir, nor); We should use dir to replace eye, eye is a position but we want the direction from eye. From ac3b4135d991188bba7f2384ebca8e197779eb94 Mon Sep 17 00:00:00 2001 From: Caballo <63630491+CaballoMa@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:10:10 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c16e488..7555a93 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # lab06-debugging +Name: Xiaoyue Ma + Shader Link: https://www.shadertoy.com/view/cd3yz2 Bug1: Apparently vec to vec2. From 4ec659edf1c6f9e7e7cf55c2b53af60613501840 Mon Sep 17 00:00:00 2001 From: Caballo <63630491+CaballoMa@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:11:09 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7555a93..dd43c40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lab06-debugging -Name: Xiaoyue Ma +# Name: Xiaoyue Ma Shader Link: https://www.shadertoy.com/view/cd3yz2