added normals to shader

This commit is contained in:
Stefan Dresselhaus
2014-01-06 21:13:58 +01:00
parent db4d55b811
commit 2193a0e7fd
5 changed files with 42 additions and 11 deletions

View File

@ -297,8 +297,8 @@ parseTemplate (r:rs) t =
(case T.head t of
'~' -> (0, Water)
'S' -> (0, Sand)
'G' -> (fromIntegral (r `mod` 3)/2.0,Grass)
'M' -> (fromIntegral (r `mod` 3 + 2)/2.0, Mountain)
'G' -> (fromIntegral (r `mod` 10)/10.0,Grass)
'M' -> (fromIntegral ((r `mod` 10) + 20)/10.0, Mountain)
_ -> error "invalid template format for map"
):parseTemplate rs (T.tail t)
parseTemplate [] _ = error "out of randoms.."