Add aggressive light culling

This commit is contained in:
2022-06-17 18:24:24 +01:00
parent 55341f7caf
commit cbfb417d21
26 changed files with 114 additions and 47 deletions
+6 -3
View File
@@ -2,6 +2,7 @@ module Dodge.Render.ShapePicture
( worldSPic
) where
import Dodge.ShortShow
import Dodge.CullBox
import Dodge.Config.Data
import Dodge.Render.InfoBox
import Dodge.Debug.Picture
@@ -53,7 +54,7 @@ extraPics cfig w = pictures (_decorations w)
<> concatMapPic (dbArg _bmDraw) (_positronBeams $ _beams w)
<> concatMapPic (dbArg _bmDraw) (_electronBeams $ _beams w)
<> concatMapPic (dbArg _lsPict) (_lightSources w)
<> testPic w
<> testPic cfig w
<> _debugPicture w
<> concatMapPic clDraw (_clouds w )
<> concatMapPic ppDraw (_pressPlates w )
@@ -65,8 +66,10 @@ extraPics cfig w = pictures (_decorations w)
<> drawPathing cfig w
<> drawCrInfo cfig w
testPic :: World -> Picture
testPic _ = mempty
testPic :: Configuration -> World -> Picture
testPic cfig w = setLayer DebugLayer $ color green $ line $ (x:xs) ++ [x]
where
(x:xs) = cullBox cfig w
clDraw :: Cloud -> Picture
clDraw c = translate3 (_clPos c) (_clPict c c)