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

https://www.shadertoy.com/view/tfsBDf

Syntax error: vec doesn't exist, should be vec2

Camera error: The line H *= len * iResolution.x / iResolution.x incorrectly calculates horizontal camera vector, causing image to stretch along x

Raycast bug: UV used to create camera rays is uv (0 to 1) instead of uv2 (-1 to 1), UV should be from -1 to 1, 0 to 1 only calculates rays in one camera quadrant

Raymarch for loop: requires more iterations to hit the floor behind the spheres, since raymarch steps are smaller when the ray is closer to sphere

Reflect error: dir = reflect(eye, nor) wrongly reflects the eye position instead of the ray direction when calculating reflection


# 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