diff --git a/README.md b/README.md index fc7863a..e2a0d9e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,11 @@ # lab02-debugging +# Lewis Ghrist : Aaron Jiang +Link: [Debug Spheres](https://www.shadertoy.com/view/XXlcWj) +# Bugs +Bug 1/2: Syntax error in the mainImage function causing complie error (line 98). The uv vector was both defined twice and jankily: (vec uv2). Fixed by just doing uv = . . . -# Setup +Bug 3: Scale issue with the camera (line 10), causing horizontal stretching. This was due to the horizontal value being assigned an inccorect value: H = len * iResolution.x / iResolution.x; Fix: H = len * iResolution.x / iResolution.y; -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). +Bug 4: The ray march distance was too short (line 17). After only 64 steps, the background grid was not getting rendered. This also caused the floor under the spheres to look deformed. The fix was to increase the number of steps in our march to 256. -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!) +Bug 5: The specular reflections were not working (line 72). This was due to the eye vector being reflected about the normal. What we want is the vector from the eye to the intersection point to be reflected: dir = reflect(dir, nor);