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