Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 2: Utkarsh Dwivedi and Linda Zhu #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lab06-debugging
# lab06-debugging: Utkarsh Dwivedi and Linda Zhu

# Setup

Expand All @@ -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
Expand Down