summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Braendli <matthias.braendli@u-blox.com>2013-12-03 10:30:35 +0100
committerMatthias Braendli <matthias.braendli@u-blox.com>2013-12-03 10:30:35 +0100
commit68758d5e41c3d644bae3ef3181c809e2baaab7ea (patch)
tree356d4ae0d368580dfffb629837e4dba9651f3019
parentdc2de954b63d9ff4eac201e7be7e7be2520d1304 (diff)
downloadhaskell-68758d5e41c3d644bae3ef3181c809e2baaab7ea.tar.gz
haskell-68758d5e41c3d644bae3ef3181c809e2baaab7ea.tar.bz2
haskell-68758d5e41c3d644bae3ef3181c809e2baaab7ea.zip
nicer horizon
-rw-r--r--raytracer.hs6
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