Skip to content

Commit 8ab921d

Browse files
Ryhon0Calinou
authored andcommitted
Add FSR 2.2, exclusive fullscreen and ultra SSAO/SSIL to 3D Graphics Settings demo
1 parent 723331f commit 8ab921d

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

3d/graphics_settings/control.tscn

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ layout_mode = 2
169169
size_flags_horizontal = 3
170170
theme_override_font_sizes/font_size = 16
171171
selected = 0
172-
item_count = 2
172+
item_count = 3
173173
popup/item_0/text = "Bilinear (Fastest)"
174174
popup/item_1/text = "FSR 1.0 (Fast)"
175175
popup/item_1/id = 1
176+
popup/item_2/text = "FSR 2.2 (Slow)"
177+
popup/item_2/id = 2
176178

177179
[node name="FSRSharpnessLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"]
178180
unique_name_in_owner = true
@@ -203,10 +205,12 @@ layout_mode = 2
203205
size_flags_horizontal = 3
204206
theme_override_font_sizes/font_size = 16
205207
selected = 0
206-
item_count = 2
208+
item_count = 3
207209
popup/item_0/text = "Disabled"
208210
popup/item_1/text = "Enabled"
209211
popup/item_1/id = 1
212+
popup/item_2/text = "Exclusive"
213+
popup/item_2/id = 2
210214

211215
[node name="VsyncLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"]
212216
layout_mode = 2
@@ -448,7 +452,7 @@ layout_mode = 2
448452
size_flags_horizontal = 3
449453
theme_override_font_sizes/font_size = 16
450454
selected = 0
451-
item_count = 5
455+
item_count = 6
452456
popup/item_0/text = "Disabled (Fastest)"
453457
popup/item_1/text = "Very Low (Fast)"
454458
popup/item_1/id = 1
@@ -458,6 +462,8 @@ popup/item_3/text = "Medium (Average)"
458462
popup/item_3/id = 3
459463
popup/item_4/text = "High (Slow)"
460464
popup/item_4/id = 4
465+
popup/item_5/text = "Ultra (Slower)"
466+
popup/item_5/id = 5
461467

462468
[node name="SSReflectionsLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/Environment"]
463469
layout_mode = 2
@@ -492,7 +498,7 @@ layout_mode = 2
492498
size_flags_horizontal = 3
493499
theme_override_font_sizes/font_size = 16
494500
selected = 0
495-
item_count = 5
501+
item_count = 6
496502
popup/item_0/text = "Disabled (Fastest)"
497503
popup/item_1/text = "Very Low (Fast)"
498504
popup/item_1/id = 1
@@ -502,6 +508,8 @@ popup/item_3/text = "Medium (Slow)"
502508
popup/item_3/id = 3
503509
popup/item_4/text = "High (Slower)"
504510
popup/item_4/id = 4
511+
popup/item_5/text = "Ultra (Slowest)"
512+
popup/item_5/id = 5
505513

506514
[node name="VolumetricFogLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/Environment"]
507515
layout_mode = 2

3d/graphics_settings/settings.gd

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,17 @@ func _on_filter_option_button_item_selected(index: int) -> void:
8383
# Viewport scale mode setting.
8484
if index == 0: # Bilinear (Fastest)
8585
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
86-
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
86+
# FSR Sharpness is only effective when the scaling mode is FSR 1.0 or 2.2.
8787
%FSRSharpnessLabel.visible = false
8888
%FSRSharpnessSlider.visible = false
8989
elif index == 1: # FSR 1.0 (Fast)
9090
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
91-
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
91+
# FSR Sharpness is only effective when the scaling mode is FSR 1.0 or 2.2.
92+
%FSRSharpnessLabel.visible = true
93+
%FSRSharpnessSlider.visible = true
94+
elif index == 2: # FSR 2.2 (Fast)
95+
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR2
96+
# FSR Sharpness is only effective when the scaling mode is FSR 1.0 or 2.2.
9297
%FSRSharpnessLabel.visible = true
9398
%FSRSharpnessSlider.visible = true
9499

@@ -259,13 +264,16 @@ func _on_ssao_option_button_item_selected(index: int) -> void:
259264
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
260265
if index == 2: # Low
261266
world_environment.environment.ssao_enabled = true
262-
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
267+
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_LOW, true, 0.5, 2, 50, 300)
263268
if index == 3: # Medium
264269
world_environment.environment.ssao_enabled = true
265270
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_MEDIUM, true, 0.5, 2, 50, 300)
266271
if index == 4: # High
267272
world_environment.environment.ssao_enabled = true
268273
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_HIGH, true, 0.5, 2, 50, 300)
274+
if index == 5: # Ultra
275+
world_environment.environment.ssao_enabled = true
276+
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_ULTRA, true, 0.5, 2, 50, 300)
269277

270278

271279
func _on_ssil_option_button_item_selected(index: int) -> void:
@@ -286,6 +294,9 @@ func _on_ssil_option_button_item_selected(index: int) -> void:
286294
if index == 4: # High
287295
world_environment.environment.ssil_enabled = true
288296
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_HIGH, true, 0.5, 4, 50, 300)
297+
if index == 5: # Ultra
298+
world_environment.environment.ssil_enabled = true
299+
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_ULTRA, true, 0.5, 4, 50, 300)
289300

290301

291302
func _on_sdfgi_option_button_item_selected(index: int) -> void:
@@ -310,8 +321,10 @@ func _on_glow_option_button_item_selected(index: int) -> void:
310321
world_environment.environment.glow_enabled = false
311322
if index == 1: # Low
312323
world_environment.environment.glow_enabled = true
324+
RenderingServer.environment_glow_set_use_bicubic_upscale(false)
313325
if index == 2: # High
314326
world_environment.environment.glow_enabled = true
327+
RenderingServer.environment_glow_set_use_bicubic_upscale(true)
315328

316329

317330
func _on_volumetric_fog_option_button_item_selected(index: int) -> void:

0 commit comments

Comments
 (0)