Add aggressive light culling
This commit is contained in:
+10
-1
@@ -94,7 +94,7 @@ doSideEffects u = do
|
||||
(_pictureShaders $ _renderData preData)
|
||||
(setDepth (-1)
|
||||
. translate (-0.5) (-0.8) . scale 0.0005 0.0005
|
||||
. text $ "ms/frame " ++ show (endTicks - lastFrameTicks)
|
||||
$ fpsText (endTicks - lastFrameTicks)
|
||||
)
|
||||
return $ u'
|
||||
& preloadData . frameTimer .~ endTicks
|
||||
@@ -102,6 +102,15 @@ doSideEffects u = do
|
||||
& uvWorld . toPlaySounds .~ M.empty
|
||||
& uvWorld . sideEffects .~ return
|
||||
|
||||
fpsText :: (Show a, Ord a, Num a) => a -> Picture
|
||||
fpsText x = color col $ text $ "ms/frame " ++ show x
|
||||
where
|
||||
col | x < 22 = blue
|
||||
| x < 30 = green
|
||||
| x < 40 = yellow
|
||||
| x < 50 = orange
|
||||
| otherwise = red
|
||||
|
||||
doPreload :: IO PreloadData
|
||||
doPreload = do
|
||||
rData <- preloadRender
|
||||
|
||||
Reference in New Issue
Block a user