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 - Katherine Li #19

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

I worked with Joyce Chen

[Link to shader toy solution](https://www.shadertoy.com/view/l3fcD2)

# Bugs
1. vec uv2 = 2.0 * uv - vec2(1.0); – We found this bug because the bright red compiler errors "'vec' : undeclared identifier" "'uv2' : syntax error" were kind of hard to ignore haha. Changed vec to vec2.
2. raycast(uv, dir, eye, ref); – We saw that uv2 from bug 1 wasn't used, but should have been used by raycast, so changed uv to uv2.
3. H *= len * iResolution.x / iResolution.x; – After we fixed the first bug the shader looked stretched, so we fixed the aspect ratio here by changing it to iResolution.x / iResolution.y
4. dir = reflect(eye, nor); – We found this bug because the reflection was off, and it made more sense to do dir = reflect(dir, nor);
5. for(int i = 0; i < 64; ++i) { – We noticed you couldn't see as much of the background in our shader vs. the reference, so we increased the number of iterations from 64 to 200 in the march function (so the ray can search farther)

# 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