diff options
-rw-r--r-- | raytracer.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/raytracer.hs b/raytracer.hs index 3b6a8fa..f127d9d 100644 --- a/raytracer.hs +++ b/raytracer.hs @@ -55,8 +55,8 @@ beta2 = 120 * degrees floorscale = 4 -w = 600 * 2 -h = 330 * 2 +w = 1920 +h = 1080 oversampling = 4 -- each pixel is oversampling^2 rays @@ -148,7 +148,7 @@ intersect_floor source (alpha, beta) | y > (-0.5) && y < 0.5 = ((x, y, z), t, (attn, attn, 0)) -- y near 0 : yellow | beta <= 90*degrees = ((x, y, z), 0, checkerboard_pattern x y 128) | otherwise = ((x, y, z), t, checkerboard_pattern x y attn) - where attn = max 0 (round (255 - 8*(sqrt $ abs t))) + where attn = max 0 (round (255 - 4*(sqrt $ abs t))) ((x, y, z), t) = intersect_point_floor source (alpha, beta) -- blue is beautiful, but a green tint is nice too |