Make light position uniform 3d

This commit is contained in:
2021-06-25 01:19:20 +02:00
parent b451953b99
commit b6feccd934
10 changed files with 40 additions and 71 deletions
+5 -4
View File
@@ -86,10 +86,11 @@ flashFlareAt col alphax (x,y) = Particle
explosionFlashAt :: Point2 -> World -> World
explosionFlashAt p = over tempLightSources ((:) $ tLightFade 20 150 intensityFunc p)
. glareAt 20 10 5 (withAlpha 0.3 white) 75 150 p
where intensityFunc x
| x < 10 = 1 / (10 - fromIntegral x)
| otherwise = 1
. glareAt 20 10 5 (withAlpha 0.3 white) 75 150 p
where
intensityFunc x
| x < 10 = 1 / (10 - fromIntegral x)
| otherwise = 1
flameGlareAt :: Point2 -> World -> World
flameGlareAt = glareAt 1 10 5 (withAlpha 0.05 orange) 8 40