summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-13 21:44:08 +0200
committertpart <tpart120@proton.me>2024-08-13 21:44:08 +0200
commitebc36f3f18547608c19ddeba39997c7bf2613010 (patch)
treed61153f28f8dc41d6f5045b634ed382ccce07d30 /client
parent598cc27e750b00cb9c4e58789dee19c926bbd41e (diff)
downloadhurrycurry-ebc36f3f18547608c19ddeba39997c7bf2613010.tar
hurrycurry-ebc36f3f18547608c19ddeba39997c7bf2613010.tar.bz2
hurrycurry-ebc36f3f18547608c19ddeba39997c7bf2613010.tar.zst
Make global illumination setting a dropdown menu
Diffstat (limited to 'client')
-rw-r--r--client/global.gd3
-rw-r--r--client/map/auto_setup/environment_setup.gd2
-rw-r--r--client/map/map.gd4
3 files changed, 4 insertions, 5 deletions
diff --git a/client/global.gd b/client/global.gd
index f36296a9..59ba5930 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -58,8 +58,7 @@ var default_settings := {
"aa": DropdownSetting.new(tr("Anti-aliasing"), 2 if on_high_end() else 0, [tr("Disabled"), "FXAA", "MSAA 2x", "MSAA 4x"]),
"ssao": ToggleSetting.new(tr("Ambient occlusion"), true if on_high_end() else false),
"taa": ToggleSetting.new(tr("Temporal Anti-Aliasing"), false),
- "voxel_gi": ToggleSetting.new(tr("Use VoxelGI (Blocks the game on map update but is more accurate)"), false),
- "sdfgi": ToggleSetting.new(tr("Use SDFGI (Doesn't block the game but produces more artifacts)"), false),
+ "gi": DropdownSetting.new(tr("Global illumination"), 0, [tr("Disabled"), tr("SDFGI"), tr("Voxel GI")]),
"shadows": ToggleSetting.new(tr("Enable shadows"), true if on_high_end() else false),
"glow": ToggleSetting.new(tr("Enable glow"), true if on_high_end() else false),
"debug_info": ToggleSetting.new(tr("Display debug info (Framerate, etc.)"), false),
diff --git a/client/map/auto_setup/environment_setup.gd b/client/map/auto_setup/environment_setup.gd
index 64180d8c..456c2f70 100644
--- a/client/map/auto_setup/environment_setup.gd
+++ b/client/map/auto_setup/environment_setup.gd
@@ -27,7 +27,7 @@ func _ready():
func apply_settings():
environment.ssao_enabled = Global.get_setting("ssao")
- environment.sdfgi_enabled = Global.get_setting("sdfgi") and allow_sdfgi
+ environment.sdfgi_enabled = Global.get_setting("gi") == 1 and allow_sdfgi
environment.glow_enabled = Global.get_setting("glow")
if !Global.on_vulkan():
environment.environment.tonemap_exposure = 0.5
diff --git a/client/map/map.gd b/client/map/map.gd
index 7be1a102..208665bf 100644
--- a/client/map/map.gd
+++ b/client/map/map.gd
@@ -54,7 +54,7 @@ func _ready():
voxelgi_timer.connect("timeout", gi_bake)
Global.settings_changed.connect(func():
# is not baked yet but setting is true
- if Global.get_setting("voxel_gi") and not currently_baked:
+ if Global.get_setting("gi") == 2 and not currently_baked:
gi_bake()
else:
currently_baked = false
@@ -62,7 +62,7 @@ func _ready():
)
func gi_bake():
- if not Global.get_setting("voxel_gi"): return
+ if not Global.get_setting("gi") == 2: return
print("Map: Rebaking VoxelGI")
currently_baked = true
gi_bake_blocking()