From 4228f7b38cfdc0c0de2f24d423ee1dfe511b07e3 Mon Sep 17 00:00:00 2001 From: Jack <48346461+JackXTY@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:50:43 -0400 Subject: [PATCH 1/3] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index aa0f112..36772fb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # lab06-debugging +- Name +Tianyi Xiao + +- [Link_To_My_Solution](https://www.shadertoy.com/view/cs3cz2) + +- Bug List +1. `vec uv2 = 2.0 * uv - vec2(1.0); // should change 'vec uv2' to 'vec2 uv2', to make the argument type right` +2. `H *= len * iResolution.x / iResolution.x; // should change to 'iResolution.x / iResolution.y', to fit in the screen size` +3. `raycast(uv, dir, eye, ref); // should use uv2 rather than uv` +4. `dir = reflect(eye, nor); // should use dir, which is the direction from eye to the intersection point` +5. `for(int i = 0; i < 64; ++i) { // 64 is too small for ray casting iterations` + # Setup 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). From 638bbc749e5670390bc9cd34f6f211020de5fdab Mon Sep 17 00:00:00 2001 From: Jack <48346461+JackXTY@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:50:59 -0400 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36772fb..a535ad5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # lab06-debugging -- Name -Tianyi Xiao +- Name: + Tianyi Xiao - [Link_To_My_Solution](https://www.shadertoy.com/view/cs3cz2) From 9bcd5be7702255d6a32c19a64c0f5d4e45d74d73 Mon Sep 17 00:00:00 2001 From: Jack <48346461+JackXTY@users.noreply.github.com> Date: Wed, 20 Sep 2023 11:53:36 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a535ad5..341145b 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ - [Link_To_My_Solution](https://www.shadertoy.com/view/cs3cz2) - Bug List -1. `vec uv2 = 2.0 * uv - vec2(1.0); // should change 'vec uv2' to 'vec2 uv2', to make the argument type right` -2. `H *= len * iResolution.x / iResolution.x; // should change to 'iResolution.x / iResolution.y', to fit in the screen size` -3. `raycast(uv, dir, eye, ref); // should use uv2 rather than uv` -4. `dir = reflect(eye, nor); // should use dir, which is the direction from eye to the intersection point` -5. `for(int i = 0; i < 64; ++i) { // 64 is too small for ray casting iterations` +1. `vec uv2 = 2.0 * uv - vec2(1.0); // found with compiler error, should change 'vec uv2' to 'vec2 uv2', to make the argument type right` +2. `H *= len * iResolution.x / iResolution.x; // the sphere is stretched, should change to 'iResolution.x / iResolution.y', to fit in the screen size` +3. `raycast(uv, dir, eye, ref); // screen is shifted, should use uv2 rather than uv` +4. `dir = reflect(eye, nor); // reflection result wrong, should use dir, which is the direction from eye to the intersection point` +5. `for(int i = 0; i < 64; ++i) { // no far ground, 64 is too small for ray casting iterations` # Setup