Comment the ray tracing loop

This commit is contained in:
2024-10-11 00:56:03 +02:00
parent 3fb52b966e
commit 43d3cadb09
4 changed files with 98 additions and 50 deletions
+3 -3
View File
@@ -96,7 +96,7 @@ Ray ray_through_screen_at(float px, float py, float aspect_ratio)
{
assert(!isnan(aspect_ratio));
Vector3 w = normalize(scale(camera_front, -1));
Vector3 w = normalize(scalev(camera_front, -1));
Vector3 u = normalize(cross(camera_up, w));
Vector3 v = cross(w, u);
@@ -109,8 +109,8 @@ Ray ray_through_screen_at(float px, float py, float aspect_ratio)
assert(!isnan(screen_h));
assert(!isnan(screen_w));
Vector3 horizontal = scale(u, screen_w);
Vector3 vertical = scale(v, screen_h);
Vector3 horizontal = scalev(u, screen_w);
Vector3 vertical = scalev(v, screen_h);
assert(!isnanv(horizontal));
assert(!isnanv(vertical));