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

Charles Wang #16

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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# lab02-debugging

# Submission (Charles Wang)

Did not work with anyone.

Link to Shadertoy: [https://www.shadertoy.com/view/lXXyD2](https://www.shadertoy.com/view/lXXyD2)

1. When the page first loaded, Shadertoy pointed out an error it had while compiling. I corrected the type from vec to vec2.
2. I realized that even though we calculated the value of uv2, we never actually used it. That didn't feel right so I replaced uv with uv2 in the raycast() call, which fixed the viewport only rendering the first quadrant.
3. I noticed the ground was "cut off" early, which usually meant we weren't marching far enough. So I quadrupled the step size we took and it fixed it.
4. I went line by line through sdf3D(), and realized that the reflection we take about the intersection point was incorrect. `eye` is the position of the camera, not the direction that we're reflecting, so I changed that, and everything else worked.

# 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).
Expand Down