Skip to content

Lab06: Dongying Liu #5

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
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,48 @@ It don't do that. Correct THREE of the FIVE bugs that are messing up the output.

Extra credit if you can find all FIVE bugs.

# Results

***Teammates:*** Wenqing Wang, Yuqi Zhang

## Bug01
Shadertoy: https://www.shadertoy.com/view/msS3Rt
```GLSL
// line 97 vec2 -> vec
vec2 uv2 = 2.0 * uv - vec2(1.0);
```
This is a simple compiler error!

## Bug02
Shadertoy: https://www.shadertoy.com/view/ddSGzt
```GLSL
// line 100 uv -> uv2
raycast(uv2, dir, eye, ref);
```
It looks like the intersection is not correct, after we change the uv, we do not use the uv2 to cast the ray

## Bug03
Shadertoy: https://www.shadertoy.com/view/mdS3zt
```GLSL
// line 11 iResolution.x -> iResolution.y
H *= len * iResolution.x / iResolution.y;
```
After fixing the raycast, the resolution looks weird, so we checked all the place that might use resolution

## Bug04
```GLSL
// line 18 i = 64 -> i = 200
for(int i = 0; i < 200; ++i) {
```
It first looks like smooth intersection to me, then I found out rather than smooth intersection, the further ground is not shows, so it might be raymarching ends too early

## Bug05
```GLSL
// line 75 eye -> dir
dir = reflect(dir, nor);
```
After all the above errors, specular seems not right. So we check for the specular part and find out the reflect is not correct. It should not reflect eye with normal, but the former dir with normal

# Submission
- Create a pull request to this repository
- In the README, include the names of both your team members
Expand Down