an imagecabal build && ./raytrace && eog out.png
This commit is contained in:
parent
9205c91cc7
commit
494c03f988
@ -84,7 +84,7 @@ render w h s index = case pcolls of
|
||||
(Background (V3 br bg bb)) = sceneBackground s
|
||||
pcolls = map fromJust $ filter isJust $ (intersect ray) <$> (sceneObjects s)
|
||||
(Collision pos _ coll) = foldl1 min pcolls
|
||||
ray = Ray (center cam) $ rotCam x y w h (eye cam) (up cam) (fovy cam)
|
||||
ray = Ray (eye cam) $ rotCam x y w h (center cam) (up cam) (fovy cam)
|
||||
cam = sceneCamera s
|
||||
y = fromIntegral $ index `mod` w
|
||||
x = fromIntegral $ index `div` w
|
||||
|
Loading…
Reference in New Issue
Block a user