diff --git a/README.md b/README.md index fc7863a..0420818 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,37 @@ -# lab02-debugging +# Debugging Lab Submission - Nico Kong + +## Shadertoy + +Link: https://www.shadertoy.com/view/wfsfWf + +![](f5.png) + +## Debugging Process + +1 - Compiler help me identify that the code wrote +[line 97] vec uv2 instead of vec2 uv2; + +2 - starting by looking at the main function, I noticed that uv2 isn't used anywhere, and that is it supposed to be the input for raycast (instead of uv) +[line 100] using uv instead of uv2 as an input; + +3 - I noticed that the scene seems stretched. at this point, i decided to start reading the individual subfunctions in order, and noticed that the computation of H seems redundant and was probably a mistake. +[line 11] changed dividing by resolutionY to dividing by resolutionX; + +4 - Comparing to the result pic, i noticed the ground isn't rendered as far as it should. with only using 64 steps for the marching, it's not enough for it to reach the full scene. so i changed +[line 18] to do 256 iterations instead of only 64. + +5 - Reflection +i changed it such that when the reflection is not hitting an object, we get a white/black color; and noticed that only a small part of the geometry is changing - this suggests that the reflection rays are hitting something. +I'm now assuming that the reflection is hitting the object itself - since the color is assigned to some material that it hit, but the object still has its own color. +up on further inspection, [line 75] dir = reflect(eye, nor); doesn't make sense. +we're trying to reflect the ray direction and not the eye vector - so I fixed the problem by changing it to +[line 75] dir = reflect(dir, nor); + +## Team Members + +This assignment was completed solo. + +# Assignment Description # Setup diff --git a/f5.png b/f5.png new file mode 100644 index 0000000..18d2496 Binary files /dev/null and b/f5.png differ