From b3749c3f53ae1b557e5aaa3cd46a2dc12746e69c Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Thu, 4 Dec 2014 01:08:04 +0100 Subject: [PATCH] comment --- src/Scene/Renderer.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Scene/Renderer.hs b/src/Scene/Renderer.hs index fff1aeb..c78d919 100644 --- a/src/Scene/Renderer.hs +++ b/src/Scene/Renderer.hs @@ -205,8 +205,8 @@ intersect r@(Ray ro rd) m@(M (Mesh s _ v f vn fn b)) = case catMaybes . elems $ det2 = det2v ^. _x >= 0 && det2v ^. _y >= 0 && det2v ^. _x + det2v ^. _y <= 1 vns = normalize $ - --(0.5 - sqrt ((sqr (det2v ^. _x) + sqr (det2v ^. _y))/2)) *^ (vnorm IM.! w1) - (1 - det2v ^. _x - det2v ^. _y) *^ (vnorm IM.! w1) + --(0.5 - sqrt ((sqr (det2v ^. _x) + sqr (det2v ^. _y))/2)) *^ (vnorm IM.! w1) -- << this one should be correct + (1 - det2v ^. _x - det2v ^. _y) *^ (vnorm IM.! w1) -- << this one works better.. + ((det2v ^. _x)/2) *^ (vnorm IM.! w2) + ((det2v ^. _y)/2) *^ (vnorm IM.! w3) sqr = \x -> x * x