Add graphics option to hide object shadows

This commit is contained in:
2022-04-25 23:53:33 +01:00
parent fa8d8b5899
commit cbef0a37f6
4 changed files with 35 additions and 26 deletions
+2
View File
@@ -11,6 +11,7 @@ data Configuration = Configuration
, _volume_music :: Float
, _graphics_wall_textured :: Bool
, _graphics_cloud_shadows :: Bool
, _graphics_object_shadows :: Bool
, _graphics_resolution_factor :: ResFactor
, _windowX :: Float
, _windowY :: Float
@@ -58,6 +59,7 @@ defaultConfig = Configuration
, _volume_music = 1
, _graphics_wall_textured = True
, _graphics_cloud_shadows = True
, _graphics_object_shadows = True
, _graphics_resolution_factor = FullRes
, _windowX = 800
, _windowY = 600
+2 -1
View File
@@ -134,7 +134,8 @@ graphicsMenuOptions :: [MenuOption]
graphicsMenuOptions =
[ makeEnumOption ScancodeS graphics_resolution_factor "RESOLUTION" updateFramebufferSize
, makeBoolOption ScancodeW graphics_wall_textured "WALL TEXTURES"
, makeBoolOption ScancodeD graphics_cloud_shadows "CLOUD SHADOWS"
, makeBoolOption ScancodeO graphics_object_shadows "OBJECT SHADOWS"
, makeBoolOption ScancodeC graphics_cloud_shadows "CLOUD SHADOWS"
]
gameOverMenu :: ScreenLayer
+6 -2
View File
@@ -131,7 +131,9 @@ doDrawing pdata u = do
drawShader (_textureArrayShader pdata) nFls
--draw lightmap into its own buffer
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
createLightMap pdata lightPoints nWalls nSilIndices nIndices (snd $ snd $ _fboBase pdata)
createLightMap pdata lightPoints nWalls nSilIndices nIndices
(_graphics_object_shadows $ _config u)
(snd $ snd $ _fboBase pdata)
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
--apply lightmap to base buffer
@@ -185,7 +187,9 @@ doDrawing pdata u = do
depthMask $= Disabled
blend $= Enabled
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
createLightMap pdata lightPoints nWalls nSilIndices nIndices (snd $ snd $ _fboCloud pdata)
createLightMap pdata lightPoints nWalls nSilIndices nIndices
(_graphics_object_shadows $ _config u)
(snd $ snd $ _fboCloud pdata)
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
--apply lightmap to cloud buffer