Skip to content

Lab 02: Claire Lu & Dineth Meegoda #19

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

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
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# lab06-debugging
# lab06-debugging - Claire Lu & Dineth Meegoda

bug1: on line 97, vec2 was written as vec
There was compile error preventing it from being run so we were able to quickly see where the bug was.

bug2: on line 100, we were passing in uv to raycast instead of uv2 in the main method.
we started by looking at main and then parsed through the code sequentially. We realized that uv2 was being initialized but not used.

bug3: in raycast, the height was calculated by dividing by x resolution over x resolution instead of x over y. We found it by realizing that the height of the image was warped/cut off.

bu4: in the march function we changed the iterations from 64 to 200. There was warping on the sides on the spheres and the background wasnt shown as much as it was in the example render. By increasing the iterations the ray was able to cast further.

bug5: in the sdf3D funftion, we fixed the reflection by reflecting over dir instead of eye. We realized that eye was a position vector and not a directional vector so we couldnt accurately reflect the direction from the camera across the normal of the intersection surface.

[Shadertoy solution link](https://www.shadertoy.com/view/cdcczj)
# 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