finer grains

This commit is contained in:
nek0 2018-10-26 02:14:13 +02:00
parent f4809653ab
commit 2383dda0fe
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ draw state@(State pos@(V2 x y) rot _ _) = do
let rayLength = castRay (fromIntegral w) (fromIntegral h) ddw ddh
in getPixel (fromMaybe 11 rayLength)
castRay w h ddw ddh =
let iter = [0, 0.05 .. 10]
let iter = [0, 0.01 .. 10]
collPos a = (pos + (V2 0 (a * cos (- fov / 2 + ddh * fov / h))
`rotVec` (rot - fov / 2 + ddw * fov / w)))
in foldl (\acc a ->