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

Name:

Tianhong Zhou

Link:

[ShaderToy](https://www.shadertoy.com/view/wcfBWl)

Bug:

1. vec uv2 = 2.0 * uv - vec2(1.0); -> vec2 uv2 = 2.0 * uv - vec2(1.0);

There is a warning.

2. raycast(uv, dir, eye, ref); -> raycast(uv2, dir, eye, ref);

Before change this bug, it only shows 1/4 of the full scene, so it must be related to uv.

3. H *= len * iResolution.x / iResolution.y; -> H *= len * iResolution.x / iResolution.x;

Spheres become ellipsoids, must be some ratio error.

4. dir = reflect(eye, nor); -> dir = reflect(dir, nor);

Unable to see reflection, must be related to reflection part.

5. for(int i = 0; i < 64; ++i) -> for(int i = 0; i < 256; ++i)

Unable to see the full floor, must be realted to raymarching distance.

# 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