From 55778d2fc9bb590dc55d073a8dcd7526b5eb1239 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Fri, 24 Oct 2014 22:47:01 +0200 Subject: [PATCH] added README --- README.md | 3 +++ src/Scene/Renderer.hs | 1 + 2 files changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e81a7c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# htrace - a raytracer in Haskell + +This is a little raytracer that i write/wrote for the lecture computergraphics in the winter 14/15. diff --git a/src/Scene/Renderer.hs b/src/Scene/Renderer.hs index 89d138a..5c84e5e 100644 --- a/src/Scene/Renderer.hs +++ b/src/Scene/Renderer.hs @@ -56,6 +56,7 @@ diffuse (Collision pos n _ obj) s (Light lpos color int) = else ill where + -- angle of light * (color * material) ill = (*) (dot n $ normalize lightdir) <$> ((*) <$> color ^* i <*> materialDiffuse mat) mat = getMaterial obj blocked = raytrace (Ray pos lightdir) s