diff --git a/README.md b/README.md index aa0f112..b382307 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# lab06-debugging +# lab06-debugging: Utkarsh Dwivedi and Linda Zhu # Setup @@ -11,6 +11,16 @@ It don't do that. Correct THREE of the FIVE bugs that are messing up the output. Extra credit if you can find all FIVE bugs. +## Our fixed shader toy: https://www.shadertoy.com/view/cd3yzj. + +# Bugs Corrected (5.5?) +1. Compile error --> The variable type for uv in mainImage() was a vec, instead of a vec2. +2. Scene was off the screen --> raycast() was using the NDC coordinates uv, instead of uv2 in the screen space. +3. Shapes seemed stretched horizontally (in the x-axis) --> The half vector H in raycast() was calculated wrong. It was doing len * iResolution.x / iResolution.x, which is just len. Instead we should correct the dividend to iResolution.y. +4. No reflection on the material --> When calculating specular reflection, dir was reflecting the eye position with respect to the normal, which doesn't make sense. Instead dir should be reflect(dir, nor). +5. The amount of floor seen is less --> In march(), the maximum number of iterations was 64 so we terminated too early. Instead we just changed it to 256 to make more tiling visible. **In addition, we added a constraint on the maximum distance t to be 100. This might not be the 6th bug for the ray marching algorithm but definitely an optimization.** + + # Submission - Create a pull request to this repository - In the README, include the names of both your team members