Square light radius on cpu (should be done in code)

This commit is contained in:
2021-09-01 21:02:18 +01:00
parent d0aeeed5c3
commit 02193add68
3 changed files with 9 additions and 7 deletions
+2 -2
View File
@@ -224,9 +224,9 @@ lightsForGloom w = mapMaybe getLS (IM.elems $ _lightSources w) ++ mapMaybe getTL
where
getLS ls
| dist campos (fst2 $ _lsPos ls) > 1000 = Nothing
| otherwise = Just ( _lsPos ls, _lsRad ls , _lsIntensity ls)
| otherwise = Just ( _lsPos ls, (_lsRad ls)^2 , _lsIntensity ls)
getTLS ls
| dist campos (fst2 $ _tlsPos ls) > 1000 = Nothing
| otherwise = Just ( _tlsPos ls, _tlsRad ls, _tlsIntensity ls)
| otherwise = Just ( _tlsPos ls, (_tlsRad ls)^2, _tlsIntensity ls)
campos = _cameraCenter w
fst2 (V3 a b _) = V2 a b