diff --git a/3d/graphics_settings/3d_scene.tscn b/3d/graphics_settings/3d_scene.tscn index b4b4c487..7f072c3b 100644 --- a/3d/graphics_settings/3d_scene.tscn +++ b/3d/graphics_settings/3d_scene.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://cbdt8lmycl8pc"] +[gd_scene load_steps=13 format=3 uid="uid://cbdt8lmycl8pc"] [sub_resource type="BoxMesh" id="BoxMesh_vm88u"] @@ -8,59 +8,84 @@ metallic = 0.5 roughness = 0.5 emission_enabled = true emission = Color(0, 1, 0, 1) -emission_energy = 4.0 [sub_resource type="BoxMesh" id="BoxMesh_07f2q"] material = SubResource( "StandardMaterial3D_we7ye" ) [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6mjsl"] albedo_color = Color(0.282353, 0.282353, 0.282353, 1) -metallic = 0.5 -roughness = 0.5 [sub_resource type="QuadMesh" id="QuadMesh_2uocv"] material = SubResource( "StandardMaterial3D_6mjsl" ) size = Vector2(200, 200) -[sub_resource type="VoxelGIData" id="VoxelGIData_lqs4w"] -_data = { -"bounds": AABB(-11.9559, -10, -11.1064, 23.9118, 20, 22.2128), -"level_counts": PackedInt32Array(1, 0, 0, 0, 0, 0, 0, 0), -"octree_cells": PackedByteArray(255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255), -"octree_data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), -"octree_df_png": PackedByteArray(137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 64, 0, 0, 0, 0, 128, 8, 0, 0, 0, 0, 214, 24, 46, 249, 0, 0, 0, 1, 115, 82, 71, 66, 0, 174, 206, 28, 233, 0, 0, 9, 90, 73, 68, 65, 84, 120, 156, 237, 220, 49, 1, 0, 32, 12, 192, 48, 192, 191, 231,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69, 78, 68, 174, 66, 96, 130), -"octree_size": Vector3(128, 128, 128), -"to_cell_xform": Transform3D(5.353, 0, 0, 0, 5.353, 0, 0, 0, 5.353, 64, 53.53, 59.4525) -} +[sub_resource type="BoxMesh" id="BoxMesh_twdwb"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_brk07"] +albedo_color = Color(0.47451, 0.25098, 1, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_3im6l"] +size = Vector3(16, 16, 1) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_q4uaa"] +metallic = 0.9 +roughness = 0.1 + +[sub_resource type="SphereMesh" id="SphereMesh_38g8l"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_aho7u"] +metallic = 1.0 +roughness = 0.0 + +[sub_resource type="FogMaterial" id="FogMaterial_tldur"] +emission = Color(0.627451, 0, 1, 1) [node name="Node3D" type="Node3D"] -[node name="Camera3D" type="Camera3D" parent="."] -transform = Transform3D(0.792311, 0.432666, -0.430166, -1.49012e-08, 0.705055, 0.709152, 0.610117, -0.561869, 0.558623, -0.447284, 1.90622, 1.82544) - [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] -transform = Transform3D(0.785036, 0.546902, -0.290891, 0, 0.469595, 0.882882, 0.61945, -0.693094, 0.368649, -8.27725, 4.41749, 0) +transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0) +visible = false +shadow_enabled = true +directional_shadow_max_distance = 250.0 -[node name="NormalCube" type="MeshInstance3D" parent="."] +[node name="Camera3D" type="Camera3D" parent="."] +transform = Transform3D(0.887547, -0.303155, 0.346926, -3.32261e-09, 0.753013, 0.658006, -0.460717, -0.584011, 0.668334, 1.58606, 3.10979, 4.04378) + +[node name="OmniLight3D" type="OmniLight3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.02753, -1.19209e-07, 0.710748) +shadow_enabled = true +shadow_bias = 0.04 +shadow_blur = 2.5 + +[node name="WhiteBox" type="MeshInstance3D" parent="."] +gi_mode = 1 mesh = SubResource( "BoxMesh_vm88u" ) -[node name="Light" type="MeshInstance3D" parent="."] +[node name="GreenEmissiveBox" type="MeshInstance3D" parent="."] transform = Transform3D(1.1804, 0, -0.190789, 0, 1.64407, 0, 0.339276, 0, 0.663786, 1.43118, 0, 0.586329) +gi_mode = 1 mesh = SubResource( "BoxMesh_07f2q" ) [node name="Floor" type="MeshInstance3D" parent="."] transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.60722, 0) +gi_mode = 1 mesh = SubResource( "QuadMesh_2uocv" ) -[node name="OmniLight3D" type="OmniLight3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.908893, 0, 1.21467) +[node name="PurpleBox" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.365823, -0.778727, 0.564842) +mesh = SubResource( "BoxMesh_twdwb" ) +surface_material_override/0 = SubResource( "StandardMaterial3D_brk07" ) -[node name="ReflectionProbe" type="ReflectionProbe" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.48328, 0, -5.4928) -box_projection = true -enable_shadows = true +[node name="Mirror" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1) +mesh = SubResource( "BoxMesh_3im6l" ) +surface_material_override/0 = SubResource( "StandardMaterial3D_q4uaa" ) -[node name="VoxelGI" type="VoxelGI" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -5.58823) -extents = Vector3(11.9559, 10, 11.1064) -data = SubResource( "VoxelGIData_lqs4w" ) +[node name="ReflectiveSphere" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.4368, 0, 0) +mesh = SubResource( "SphereMesh_38g8l" ) +surface_material_override/0 = SubResource( "StandardMaterial3D_aho7u" ) + +[node name="FogVolume" type="FogVolume" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.342018, -1.18089, 0.661332) +material = SubResource( "FogMaterial_tldur" ) diff --git a/3d/graphics_settings/README.md b/3d/graphics_settings/README.md index 479d52d1..f70da0f2 100644 --- a/3d/graphics_settings/README.md +++ b/3d/graphics_settings/README.md @@ -1,21 +1,28 @@ -# 3D Settings Menu (Graphical Settings) +# 3D Graphics Settings + +A demo showing an example of a graphics settings menu. -A demo showing an example of a settings menu. Included settings are: - - UI Scaling; - - Render Quality; - - Filter; - - Vsync; - - Anti-Aliasing; - - Fullscreen; - - Screen-Space Reflections; - - Ambient Occlusion; - - Indirect lightning; - - Glow; - - Brightness; - - Contrast; - - Saturation. +**Video settings:** + +- UI scale. +- Resolution scale. +- Display filter (bilinear or AMD FidelityFX Super Resolution 1.0). +- Fullscreen. +- V-Sync (traditional and adaptive). +- Anti-aliasing (MSAA and FXAA). +- Camera field of view. + +**Effect settings:** + +- Signed distance field global illumination (SDFGI). +- Bloom (glow). +- Screen-space ambient occlusion (SSAO). +- Screen-Space reflections (SSR). +- Screen-space indirect lighting (SSIL). +- Volumetric fog. +- Screen adjustments: brightness, contrast, saturation. Language: GDScript diff --git a/3d/graphics_settings/control.tscn b/3d/graphics_settings/control.tscn index 6700cd1e..45002fb5 100644 --- a/3d/graphics_settings/control.tscn +++ b/3d/graphics_settings/control.tscn @@ -5,6 +5,20 @@ [ext_resource type="Texture2D" uid="uid://c5ujmv8i0y1pn" path="res://icon.png" id="3_xpykm"] [sub_resource type="Environment" id="Environment_1f0b2"] +background_mode = 1 +background_color = Color(0.6, 0.6, 0.6, 1) +tonemap_mode = 3 +tonemap_white = 6.0 +sdfgi_cascades = 2 +sdfgi_min_cell_size = 0.1 +sdfgi_cascade0_distance = 6.4 +sdfgi_max_distance = 25.6 +sdfgi_y_scale = 0 +glow_intensity = 1.0 +glow_hdr_threshold = 0.5 +glow_hdr_scale = 0.2 +volumetric_fog_density = 0.0 +volumetric_fog_temporal_reprojection_amount = 0.95 adjustment_enabled = true [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w3j8l"] @@ -22,22 +36,11 @@ script = ExtResource( "1_gm54x" ) [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource( "Environment_1f0b2" ) -[node name="SubViewportContainer" type="SubViewportContainer" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -stretch = true - -[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"] -handle_input_locally = false -size = Vector2i(1024, 600) -render_target_update_mode = 4 - -[node name="Node3D" parent="SubViewportContainer/SubViewport" instance=ExtResource( "2_hsbu5" )] +[node name="Node3D" parent="." instance=ExtResource( "2_hsbu5" )] [node name="SettingsMenu" type="PanelContainer" parent="."] anchor_bottom = 1.0 -offset_right = 372.0 -grow_horizontal = 2 +offset_right = 429.0 grow_vertical = 2 theme_override_styles/panel = SubResource( "StyleBoxFlat_w3j8l" ) @@ -45,25 +48,26 @@ theme_override_styles/panel = SubResource( "StyleBoxFlat_w3j8l" ) clip_contents = false offset_left = 20.0 offset_top = 50.0 -offset_right = 352.0 +offset_right = 409.0 offset_bottom = 590.0 [node name="VBoxContainer" type="VBoxContainer" parent="SettingsMenu/ScrollContainer"] -offset_right = 324.0 -offset_bottom = 613.0 +offset_right = 358.0 +offset_bottom = 710.0 size_flags_horizontal = 3 size_flags_vertical = 3 theme_override_constants/separation = 10 [node name="UISection" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer"] -offset_right = 324.0 +offset_right = 381.0 offset_bottom = 26.0 -text = "UI Section" +theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1) +text = "User Interface Settings" horizontal_alignment = 1 [node name="GridContainer" type="GridContainer" parent="SettingsMenu/ScrollContainer/VBoxContainer"] offset_top = 36.0 -offset_right = 324.0 +offset_right = 381.0 offset_bottom = 69.0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -72,7 +76,7 @@ columns = 2 [node name="UIScaleLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer"] offset_top = 3.0 -offset_right = 160.0 +offset_right = 188.0 offset_bottom = 29.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 @@ -80,106 +84,120 @@ text = "UI Scale:" [node name="UIScaleOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_right = 324.0 +offset_left = 192.0 +offset_right = 380.0 offset_bottom = 33.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 item_count = 5 selected = 2 -popup/item_0/text = "Extra Small" +popup/item_0/text = "Smaller (66%)" popup/item_0/id = 0 -popup/item_1/text = "Small" +popup/item_1/text = "Small (80%)" popup/item_1/id = 1 -popup/item_2/text = "Normal" +popup/item_2/text = "Medium (100%)" popup/item_2/id = 2 -popup/item_3/text = "Big" +popup/item_3/text = "Large (133%)" popup/item_3/id = 3 -popup/item_4/text = "Extra Big" +popup/item_4/text = "Larger (200%)" popup/item_4/id = 4 [node name="ViewportSection" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer"] offset_top = 79.0 -offset_right = 324.0 +offset_right = 381.0 offset_bottom = 105.0 -text = "Quality Section" +theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1) +text = "Video Settings" horizontal_alignment = 1 [node name="GridContainer2" type="GridContainer" parent="SettingsMenu/ScrollContainer/VBoxContainer"] offset_top = 115.0 -offset_right = 324.0 -offset_bottom = 296.0 +offset_right = 381.0 +offset_bottom = 356.0 columns = 2 [node name="QualityLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -offset_top = 3.0 -offset_right = 160.0 -offset_bottom = 29.0 +offset_right = 188.0 +offset_bottom = 26.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "Quality:" +text = "Resolution Scale:" -[node name="QualityOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_right = 324.0 -offset_bottom = 33.0 +[node name="QualitySlider" type="HSlider" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +offset_left = 192.0 +offset_right = 380.0 +offset_bottom = 26.0 size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -item_count = 5 -selected = 2 -popup/item_0/text = "Extra Low" -popup/item_0/id = 0 -popup/item_1/text = "Low" -popup/item_1/id = 1 -popup/item_2/text = "Medium" -popup/item_2/id = 2 -popup/item_3/text = "High" -popup/item_3/id = 3 -popup/item_4/text = "Extra High" -popup/item_4/id = 4 +size_flags_vertical = 1 +min_value = 0.25 +max_value = 2.0 +step = 0.05 +value = 1.0 [node name="FilterLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -offset_top = 40.0 -offset_right = 160.0 -offset_bottom = 66.0 +offset_top = 33.0 +offset_right = 188.0 +offset_bottom = 59.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "Filter:" +text = "Display Filter:" [node name="FilterOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 37.0 -offset_right = 324.0 -offset_bottom = 70.0 +offset_left = 192.0 +offset_top = 30.0 +offset_right = 380.0 +offset_bottom = 63.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 item_count = 2 -selected = 1 +selected = 0 +popup/item_0/text = "Bilinear (Fastest)" +popup/item_0/id = 0 +popup/item_1/text = "FSR 1.0 (Fast)" +popup/item_1/id = 1 + +[node name="FullscreenLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +offset_top = 70.0 +offset_right = 188.0 +offset_bottom = 96.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +text = "Fullscreen:" + +[node name="FullscreenOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +minimum_size = Vector2(100, 33) +offset_left = 192.0 +offset_top = 67.0 +offset_right = 380.0 +offset_bottom = 100.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +item_count = 2 +selected = 0 popup/item_0/text = "Disabled" popup/item_0/id = 0 popup/item_1/text = "Enabled" popup/item_1/id = 1 [node name="VsyncLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -offset_top = 77.0 -offset_right = 160.0 -offset_bottom = 103.0 +offset_top = 107.0 +offset_right = 188.0 +offset_bottom = 133.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "Vsync:" +text = "V-Sync:" [node name="VsyncOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 74.0 -offset_right = 324.0 -offset_bottom = 107.0 +offset_left = 192.0 +offset_top = 104.0 +offset_right = 380.0 +offset_bottom = 137.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 item_count = 3 -selected = 2 +selected = 0 popup/item_0/text = "Disabled" popup/item_0/id = 0 popup/item_1/text = "Adaptive" @@ -188,252 +206,313 @@ popup/item_2/text = "Enabled" popup/item_2/id = 2 [node name="AALabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -offset_top = 114.0 -offset_right = 160.0 -offset_bottom = 140.0 +offset_top = 144.0 +offset_right = 188.0 +offset_bottom = 170.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "Anti-Aliasing:" +text = "Anti-Aliasing (MSAA):" [node name="AAOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 111.0 -offset_right = 324.0 -offset_bottom = 144.0 -size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -item_count = 5 -selected = 0 -popup/item_0/text = "Disabled" -popup/item_0/id = 0 -popup/item_1/text = "FXAA" -popup/item_1/id = 1 -popup/item_2/text = "2x" -popup/item_2/id = 2 -popup/item_3/text = "4x" -popup/item_3/id = 3 -popup/item_4/text = "8x" -popup/item_4/id = 4 - -[node name="FullscreenLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -offset_top = 151.0 -offset_right = 160.0 -offset_bottom = 177.0 -size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -text = "Fullscreen:" - -[node name="FullscreenOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] -minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 148.0 -offset_right = 324.0 -offset_bottom = 181.0 -size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -item_count = 2 -selected = 0 -popup/item_0/text = "Disabled" -popup/item_0/id = 0 -popup/item_1/text = "Enabled" -popup/item_1/id = 1 - -[node name="EnvironmentSection" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer"] -offset_top = 306.0 -offset_right = 324.0 -offset_bottom = 332.0 -text = "Environment Section" -horizontal_alignment = 1 - -[node name="GridContainer3" type="GridContainer" parent="SettingsMenu/ScrollContainer/VBoxContainer"] -offset_top = 342.0 -offset_right = 324.0 -offset_bottom = 613.0 -columns = 2 - -[node name="SSReflectionsLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 3.0 -offset_right = 160.0 -offset_bottom = 29.0 -size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -text = "SS Reflections:" - -[node name="SSReflectionsOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_right = 324.0 -offset_bottom = 33.0 +offset_left = 192.0 +offset_top = 141.0 +offset_right = 380.0 +offset_bottom = 174.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 item_count = 4 selected = 0 -popup/item_0/text = "Disabled" +popup/item_0/text = "Disabled (Fastest)" popup/item_0/id = 0 -popup/item_1/text = "Low" +popup/item_1/text = "2× (Average)" popup/item_1/id = 1 -popup/item_2/text = "Medium" +popup/item_2/text = "4× (Slow)" popup/item_2/id = 2 -popup/item_3/text = "High" +popup/item_3/text = "8× (Slower)" popup/item_3/id = 3 -[node name="SSAOLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 40.0 -offset_right = 160.0 -offset_bottom = 66.0 +[node name="FXAALabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +offset_top = 181.0 +offset_right = 188.0 +offset_bottom = 207.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "SSAO:" +text = "Anti-Aliasing (FXAA):" -[node name="SSAOOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +[node name="FXAAOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 37.0 -offset_right = 324.0 -offset_bottom = 70.0 +offset_left = 192.0 +offset_top = 178.0 +offset_right = 380.0 +offset_bottom = 211.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 item_count = 2 selected = 0 -popup/item_0/text = "Disabled" +popup/item_0/text = "Disabled (Fastest)" popup/item_0/id = 0 -popup/item_1/text = "Enabled" +popup/item_1/text = "FXAA (Fast)" popup/item_1/id = 1 -[node name="SSILLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 77.0 -offset_right = 160.0 -offset_bottom = 103.0 +[node name="FOVLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +offset_top = 215.0 +offset_right = 188.0 +offset_bottom = 241.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "SSIL:" +text = "Field of View:" -[node name="SSILOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 74.0 -offset_right = 324.0 -offset_bottom = 107.0 +[node name="FOVSlider" type="HSlider" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2"] +offset_left = 192.0 +offset_top = 215.0 +offset_right = 380.0 +offset_bottom = 241.0 size_flags_horizontal = 3 -theme_override_font_sizes/font_size = 16 -item_count = 2 -selected = 0 -popup/item_0/text = "Disabled" -popup/item_0/id = 0 -popup/item_1/text = "Enabled" -popup/item_1/id = 1 +size_flags_vertical = 1 +min_value = 50.0 +step = 0.1 +value = 75.0 + +[node name="EnvironmentSection" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer"] +offset_top = 366.0 +offset_right = 381.0 +offset_bottom = 392.0 +theme_override_colors/font_color = Color(0.683425, 0.916893, 1, 1) +text = "Effect Settings" +horizontal_alignment = 1 + +[node name="GridContainer3" type="GridContainer" parent="SettingsMenu/ScrollContainer/VBoxContainer"] +offset_top = 402.0 +offset_right = 381.0 +offset_bottom = 710.0 +columns = 2 [node name="SDFGILabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 114.0 -offset_right = 160.0 -offset_bottom = 140.0 +offset_top = 3.0 +offset_right = 188.0 +offset_bottom = 29.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "SDFGI:" +text = "Global Illumination:" [node name="SDFGIOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] minimum_size = Vector2(100, 33) -offset_left = 164.0 -offset_top = 111.0 -offset_right = 324.0 -offset_bottom = 144.0 +offset_left = 192.0 +offset_right = 380.0 +offset_bottom = 33.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -item_count = 2 +item_count = 3 selected = 0 -popup/item_0/text = "Disabled" +popup/item_0/text = "Disabled (Fastest)" popup/item_0/id = 0 -popup/item_1/text = "Enabled" +popup/item_1/text = "Low (Average)" popup/item_1/id = 1 +popup/item_2/text = "High (Slow)" +popup/item_2/id = 2 [node name="GlowLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 151.0 -offset_right = 160.0 -offset_bottom = 177.0 +offset_top = 40.0 +offset_right = 188.0 +offset_bottom = 66.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -text = "Glow:" +text = "Bloom:" [node name="GlowOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] minimum_size = Vector2(100, 33) -offset_left = 164.0 +offset_left = 192.0 +offset_top = 37.0 +offset_right = 380.0 +offset_bottom = 70.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +item_count = 3 +selected = 0 +popup/item_0/text = "Disabled (Fastest)" +popup/item_0/id = 0 +popup/item_1/text = "Low (Fast)" +popup/item_1/id = 1 +popup/item_2/text = "High (Average)" +popup/item_2/id = 2 + +[node name="SSAOLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +offset_top = 77.0 +offset_right = 188.0 +offset_bottom = 103.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +text = "Ambient Occlusion:" + +[node name="SSAOOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +minimum_size = Vector2(100, 33) +offset_left = 192.0 +offset_top = 74.0 +offset_right = 380.0 +offset_bottom = 107.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +item_count = 5 +selected = 0 +popup/item_0/text = "Disabled (Fastest)" +popup/item_0/id = 0 +popup/item_1/text = "Very Low (Fast)" +popup/item_1/id = 1 +popup/item_2/text = "Low (Fast)" +popup/item_2/id = 2 +popup/item_3/text = "Medium (Average)" +popup/item_3/id = 3 +popup/item_4/text = "High (Slow)" +popup/item_4/id = 4 + +[node name="SSReflectionsLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +offset_top = 116.0 +offset_right = 188.0 +offset_bottom = 139.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 14 +text = "Screen-Space Reflections:" + +[node name="SSReflectionsOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +minimum_size = Vector2(100, 33) +offset_left = 192.0 +offset_top = 111.0 +offset_right = 380.0 +offset_bottom = 144.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +item_count = 4 +selected = 0 +popup/item_0/text = "Disabled (Fastest)" +popup/item_0/id = 0 +popup/item_1/text = "Low (Average)" +popup/item_1/id = 1 +popup/item_2/text = "Medium (Slow)" +popup/item_2/id = 2 +popup/item_3/text = "High (Slower)" +popup/item_3/id = 3 + +[node name="SSILLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +offset_top = 151.0 +offset_right = 188.0 +offset_bottom = 177.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +text = "Screen-Space Lighting:" + +[node name="SSILOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +minimum_size = Vector2(100, 33) +offset_left = 192.0 offset_top = 148.0 -offset_right = 324.0 +offset_right = 380.0 offset_bottom = 181.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 -item_count = 2 +item_count = 5 selected = 0 -popup/item_0/text = "Disabled" +popup/item_0/text = "Disabled (Fastest)" popup/item_0/id = 0 -popup/item_1/text = "Enabled" +popup/item_1/text = "Very Low (Fast)" popup/item_1/id = 1 +popup/item_2/text = "Low (Average)" +popup/item_2/id = 2 +popup/item_3/text = "Medium (Slow)" +popup/item_3/id = 3 +popup/item_4/text = "High (Slower)" +popup/item_4/id = 4 + +[node name="VolumetricFogLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +offset_top = 188.0 +offset_right = 188.0 +offset_bottom = 214.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +text = "Volumetric Fog:" + +[node name="VolumetricFogOptionButton" type="OptionButton" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] +minimum_size = Vector2(100, 33) +offset_left = 192.0 +offset_top = 185.0 +offset_right = 380.0 +offset_bottom = 218.0 +size_flags_horizontal = 3 +theme_override_font_sizes/font_size = 16 +item_count = 3 +selected = 0 +popup/item_0/text = "Disabled (Fastest)" +popup/item_0/id = 0 +popup/item_1/text = "Low (Fast)" +popup/item_1/id = 1 +popup/item_2/text = "High (Average)" +popup/item_2/id = 2 [node name="BrightnessLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 185.0 -offset_right = 160.0 -offset_bottom = 211.0 +offset_top = 222.0 +offset_right = 188.0 +offset_bottom = 248.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 text = "Brightness:" [node name="BrightnessSlider" type="HSlider" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_left = 164.0 -offset_top = 185.0 -offset_right = 324.0 -offset_bottom = 211.0 +offset_left = 192.0 +offset_top = 222.0 +offset_right = 380.0 +offset_bottom = 248.0 size_flags_horizontal = 3 size_flags_vertical = 1 min_value = 0.5 -max_value = 4.0 -step = 0.2 +max_value = 2.0 +step = 0.01 value = 1.0 [node name="ContrastLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 215.0 -offset_right = 160.0 -offset_bottom = 241.0 +offset_top = 252.0 +offset_right = 188.0 +offset_bottom = 278.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 text = "Contrast:" [node name="ContrastSlider" type="HSlider" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_left = 164.0 -offset_top = 215.0 -offset_right = 324.0 -offset_bottom = 241.0 +offset_left = 192.0 +offset_top = 252.0 +offset_right = 380.0 +offset_bottom = 278.0 size_flags_horizontal = 3 size_flags_vertical = 1 min_value = 0.5 -max_value = 4.0 -step = 0.2 +max_value = 2.0 +step = 0.01 value = 1.0 [node name="SaturationLabel" type="Label" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_top = 245.0 -offset_right = 160.0 -offset_bottom = 271.0 +offset_top = 282.0 +offset_right = 188.0 +offset_bottom = 308.0 size_flags_horizontal = 3 theme_override_font_sizes/font_size = 16 text = "Saturation:" [node name="SaturationSlider" type="HSlider" parent="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3"] -offset_left = 164.0 -offset_top = 245.0 -offset_right = 324.0 -offset_bottom = 271.0 +offset_left = 192.0 +offset_top = 282.0 +offset_right = 380.0 +offset_bottom = 308.0 size_flags_horizontal = 3 size_flags_vertical = 1 -min_value = 0.5 -max_value = 10.0 -step = 0.2 +min_value = 0.01 +max_value = 2.0 +step = 0.01 value = 1.0 -[node name="HideShowButton" type="CheckButton" parent="."] +[node name="HideShowButton" type="Button" parent="."] offset_right = 149.0 offset_bottom = 31.0 +focus_mode = 0 theme_override_font_sizes/font_size = 16 +toggle_mode = true button_pressed = true text = "Hide settings" @@ -448,17 +527,40 @@ grow_horizontal = 0 grow_vertical = 0 texture = ExtResource( "3_xpykm" ) +[node name="FPSLabel" type="Label" parent="."] +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -56.0 +offset_top = 16.0 +offset_right = -16.0 +offset_bottom = 39.0 +grow_horizontal = 0 +horizontal_alignment = 2 + +[node name="ResolutionLabel" type="Label" parent="."] +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -56.0 +offset_top = 48.0 +offset_right = -16.0 +offset_bottom = 71.0 +grow_horizontal = 0 +horizontal_alignment = 2 + [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer/UIScaleOptionButton" to="." method="_on_ui_scale_option_button_item_selected"] -[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/QualityOptionButton" to="." method="_on_quality_option_button_item_selected"] +[connection signal="value_changed" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/QualitySlider" to="." method="_on_quality_slider_value_changed"] [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/FilterOptionButton" to="." method="_on_filter_option_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/FullscreenOptionButton" to="." method="_on_fullscreen_option_button_item_selected"] [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/VsyncOptionButton" to="." method="_on_vsync_option_button_item_selected"] [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/AAOptionButton" to="." method="_on_aa_option_button_item_selected"] -[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/FullscreenOptionButton" to="." method="_on_fullscreen_option_button_item_selected"] -[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSReflectionsOptionButton" to="." method="_on_ss_reflections_option_button_item_selected"] -[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSAOOptionButton" to="." method="_on_ssao_option_button_item_selected"] -[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSILOptionButton" to="." method="_on_ssil_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/FXAAOptionButton" to="." method="_on_fxaa_option_button_item_selected"] +[connection signal="value_changed" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer2/FOVSlider" to="." method="_on_fov_slider_value_changed"] [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SDFGIOptionButton" to="." method="_on_sdfgi_option_button_item_selected"] [connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/GlowOptionButton" to="." method="_on_glow_option_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSAOOptionButton" to="." method="_on_ssao_option_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSReflectionsOptionButton" to="." method="_on_ss_reflections_option_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SSILOptionButton" to="." method="_on_ssil_option_button_item_selected"] +[connection signal="item_selected" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/VolumetricFogOptionButton" to="." method="_on_volumetric_fog_option_button_item_selected"] [connection signal="value_changed" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/BrightnessSlider" to="." method="_on_brightness_slider_value_changed"] [connection signal="value_changed" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/ContrastSlider" to="." method="_on_contrast_slider_value_changed"] [connection signal="value_changed" from="SettingsMenu/ScrollContainer/VBoxContainer/GridContainer3/SaturationSlider" to="." method="_on_saturation_slider_value_changed"] diff --git a/3d/graphics_settings/project.godot b/3d/graphics_settings/project.godot index fb92a7b1..88440bf2 100644 --- a/3d/graphics_settings/project.godot +++ b/3d/graphics_settings/project.godot @@ -10,7 +10,7 @@ config_version=5 [application] -config/name="3D Graphics Settings Demo" +config/name="3D Graphics Settings" run/main_scene="res://control.tscn" config/icon="res://icon.png" config/features=PackedStringArray("4.0", "Vulkan Clustered") @@ -19,3 +19,7 @@ config/features=PackedStringArray("4.0", "Vulkan Clustered") window/stretch/mode="canvas_items" window/stretch/aspect="expand" + +[rendering] + +anti_aliasing/quality/use_debanding=true diff --git a/3d/graphics_settings/screenshots/.gdignore b/3d/graphics_settings/screenshots/.gdignore new file mode 100644 index 00000000..e69de29b diff --git a/3d/graphics_settings/screenshots/interface.png b/3d/graphics_settings/screenshots/interface.png index 51798812..147f26bf 100644 Binary files a/3d/graphics_settings/screenshots/interface.png and b/3d/graphics_settings/screenshots/interface.png differ diff --git a/3d/graphics_settings/screenshots/interface.png.import b/3d/graphics_settings/screenshots/interface.png.import deleted file mode 100644 index 45607fc9..00000000 --- a/3d/graphics_settings/screenshots/interface.png.import +++ /dev/null @@ -1,33 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://dv27oyy6q3nuj" -path="res://.godot/imported/interface.png-d66f41b9831e9844ce0f39a7fbe98037.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://screenshots/interface.png" -dest_files=["res://.godot/imported/interface.png-d66f41b9831e9844ce0f39a7fbe98037.ctex"] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/bptc_ldr=0 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/3d/graphics_settings/settings.gd b/3d/graphics_settings/settings.gd index 71988aeb..9f5165aa 100644 --- a/3d/graphics_settings/settings.gd +++ b/3d/graphics_settings/settings.gd @@ -1,23 +1,39 @@ extends Control -# Window project settings: -# - Viewport size is set to 1920x1080 -# - Stretch mode is set to "canvas_items" (in godot 3.x known as 2d) -# - Stretch aspect is set to "expand" -@onready var sub_viewport := $SubViewportContainer/SubViewport -@onready var sub_viewport_container := $SubViewportContainer -@onready var world_environment := $WorldEnvironment -var current_quality := 2 # This is needed for when screen size changes -var viewport_start_size := Vector2.ZERO +# Window project settings: +# - Stretch mode is set to `canvas_items` (`2d` in Godot 3.x) +# - Stretch aspect is set to `expand` +@onready var world_environment := $WorldEnvironment +@onready var camera := $Node3D/Camera3D +@onready var fps_label := $FPSLabel +@onready var resolution_label := $ResolutionLabel + +# When the screen changes size, we need to update the 3D +# viewport quality setting. If we don't do this, the viewport will take +# the size from the main viewport. +var viewport_start_size := Vector2( + ProjectSettings.get_setting(&"display/window/size/viewport_width"), + ProjectSettings.get_setting(&"display/window/size/viewport_height") +) func _ready() -> void: - # When the screen changes size, we need to update the 3D - # viewport quality setting. If we don't do this, the viewport will take - # the size from the main viewport. - viewport_start_size.x = ProjectSettings.get_setting(&"display/window/size/viewport_width") - viewport_start_size.y = ProjectSettings.get_setting(&"display/window/size/viewport_height") - sub_viewport.connect(&"size_changed", self._on_quality_option_button_item_selected) + get_viewport().connect(&"size_changed", update_resolution_label) + update_resolution_label() + + # Disable V-Sync to uncap framerate on supported platforms. This makes performance comparison + # easier on high-end machines that easily reach the monitor's refresh rate. + DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED) + + +func _process(delta: float) -> void: + fps_label.text = "%d FPS (%.2f mspf)" % [Engine.get_frames_per_second(), 1000.0 / Engine.get_frames_per_second()] + + +func update_resolution_label() -> void: + var viewport_render_size = get_viewport().size * get_viewport().scaling_3d_scale + resolution_label.text = "3D viewport resolution: %d × %d (%d%%)" \ + % [viewport_render_size.x, viewport_render_size.y, round(get_viewport().scaling_3d_scale * 100)] func _on_HideShowButton_toggled(show_settings: bool) -> void: @@ -34,50 +50,40 @@ func _on_HideShowButton_toggled(show_settings: bool) -> void: func _on_ui_scale_option_button_item_selected(index: int) -> void: # For changing the UI, we take the viewport size, which we set in the project settings. var new_size := viewport_start_size - if index == 0: # Extra small - new_size *= 1.50 - elif index == 1: # Small + if index == 0: # Smaller (66%) + new_size *= 1.5 + elif index == 1: # Small (80%) new_size *= 1.25 - elif index == 2: # Normal + elif index == 2: # Medium (100%) new_size *= 1.0 - elif index == 3: # Big + elif index == 3: # Large (133%) new_size *= 0.75 - elif index == 4: # Extra big - new_size *= 0.50 + elif index == 4: # Larger (200%) + new_size *= 0.5 get_tree().root.set_content_scale_size(new_size) -func _on_quality_option_button_item_selected(index: int = current_quality) -> void: - # Setting the overal screen quality can be done by changing - # the sub viewport size. When the screen size changed, this function - # will get called with the current_quality variable. - var new_size : Vector2 - current_quality = index - if index == 0: # Extra low - new_size = get_viewport().size * 0.50 - elif index == 1: # Low - new_size = get_viewport().size * 0.75 - elif index == 2: # Medium - new_size = get_viewport().size - elif index == 3: # High - new_size = get_viewport().size * 1.25 - elif index == 4: # Extra high - new_size = get_viewport().size * 1.50 - sub_viewport.set_size(new_size) +func _on_quality_slider_value_changed(value: float) -> void: + get_viewport().scaling_3d_scale = value + update_resolution_label() func _on_filter_option_button_item_selected(index: int) -> void: - # Texture filter setting. This can smooth out hard edges, but can also make - # the scene appear more blurry when quality is set to low. - if index == 0: # Disabled - sub_viewport_container.set_texture_filter(CanvasItem.TEXTURE_FILTER_NEAREST) - elif index == 1: # Enabled - sub_viewport_container.set_texture_filter(CanvasItem.TEXTURE_FILTER_LINEAR) + # Viewport scale mode setting. + if index == 0: # Bilinear (Fastest) + get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR + elif index == 1: # FSR 1.0 (Fast) + push_warning("FSR is currently not working. The shader is run, but no visual difference appears on screen.") + get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR func _on_vsync_option_button_item_selected(index: int) -> void: # Vsync is enabled by default. - # Vertical synchronization locks framerate and makes screen tearing not visible. + # Vertical synchronization locks framerate and makes screen tearing not visible at the cost of + # higher input latency and stuttering when the framerate target is not met. + # Adaptive V-Sync automatically disables V-Sync when the framerate target is not met, and enables + # V-Sync otherwise. This prevents suttering and reduces input latency when the framerate target + # is not met, at the cost of visible tearing. if index == 0: # Disabled DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED) elif index == 1: # Adaptive @@ -87,25 +93,22 @@ func _on_vsync_option_button_item_selected(index: int) -> void: func _on_aa_option_button_item_selected(index: int) -> void: - # Because this option is only for the 3D objects, we need to - # change this setting on the sub viewport. - # MSAA = Better quality at a higher performance cost. - # FXAA = Low performance cost but can appear blurry. + # Multi-sample anti-aliasing. High quality, but slow. It also does not smooth out the edges of + # transparent (alpha scissor) textures. if index == 0: # Disabled - sub_viewport.set_msaa(Viewport.MSAA_DISABLED) - sub_viewport.set_screen_space_aa(Viewport.SCREEN_SPACE_AA_DISABLED) - elif index == 1: # FXAA - sub_viewport.set_msaa(Viewport.MSAA_DISABLED) - sub_viewport.set_screen_space_aa(Viewport.SCREEN_SPACE_AA_FXAA) - elif index == 2: # 2x - sub_viewport.set_msaa(Viewport.MSAA_2X) - sub_viewport.set_screen_space_aa(Viewport.SCREEN_SPACE_AA_DISABLED) - elif index == 3: # 4x - sub_viewport.set_msaa(Viewport.MSAA_4X) - sub_viewport.set_screen_space_aa(Viewport.SCREEN_SPACE_AA_DISABLED) - elif index == 4: # 8x - sub_viewport.set_msaa(Viewport.MSAA_8X) - sub_viewport.set_screen_space_aa(Viewport.SCREEN_SPACE_AA_DISABLED) + get_viewport().msaa = Viewport.MSAA_DISABLED + elif index == 1: # 2× + get_viewport().msaa = Viewport.MSAA_2X + elif index == 2: # 4× + get_viewport().msaa = Viewport.MSAA_4X + elif index == 3: # 8× + get_viewport().msaa = Viewport.MSAA_8X + + +func _on_fxaa_option_button_item_selected(index: int) -> void: + # Fast approximate anti-aliasing. Much faster than FXAA (and works on alpha scissor edges), + # but blurs the whole scene rendering slightly. + get_viewport().screen_space_aa = index == 1 func _on_fullscreen_option_button_item_selected(index: int) -> void: @@ -118,6 +121,10 @@ func _on_fullscreen_option_button_item_selected(index: int) -> void: get_tree().root.set_mode(Window.MODE_FULLSCREEN) +func _on_fov_slider_value_changed(value: float) -> void: + camera.fov = value + + func _on_ss_reflections_option_button_item_selected(index: int) -> void: # This is a setting that is attached to the environment. # If your game requires you to change the environment, @@ -132,19 +139,27 @@ func _on_ss_reflections_option_button_item_selected(index: int) -> void: world_environment.environment.set_ssr_max_steps(32) elif index == 3: # High world_environment.environment.set_ssr_enabled(true) - world_environment.environment.set_ssr_max_steps(64) - # We set the fade in higher (default is 0.15) so it looks - # a better and cleaner. - world_environment.environment.set_ssr_fade_in(0.7) + world_environment.environment.set_ssr_max_steps(56) + func _on_ssao_option_button_item_selected(index: int) -> void: # This is a setting that is attached to the environment. # If your game requires you to change the environment, # then be sure to run this function again to set the settings correct. if index == 0: # Disabled - world_environment.environment.set_ssao_enabled(false) - elif index == 1: # Enabled - world_environment.environment.set_ssao_enabled(true) + world_environment.environment.ssao_enabled = false + if index == 1: # Very Low + world_environment.environment.ssao_enabled = true + RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300) + if index == 2: # Low + world_environment.environment.ssao_enabled = true + RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300) + if index == 3: # Medium + world_environment.environment.ssao_enabled = true + RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_MEDIUM, true, 0.5, 2, 50, 300) + if index == 4: # High + world_environment.environment.ssao_enabled = true + RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_HIGH, true, 0.5, 2, 50, 300) func _on_ssil_option_button_item_selected(index: int) -> void: @@ -152,9 +167,19 @@ func _on_ssil_option_button_item_selected(index: int) -> void: # If your game requires you to change the environment, # then be sure to run this function again to set the settings correct. if index == 0: # Disabled - world_environment.environment.set_ssil_enabled(false) - elif index == 1: # Enabled - world_environment.environment.set_ssil_enabled(true) + world_environment.environment.ssil_enabled = false + if index == 1: # Very Low + world_environment.environment.ssil_enabled = true + RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_VERY_LOW, true, 0.5, 4, 50, 300) + if index == 2: # Low + world_environment.environment.ssil_enabled = true + RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_LOW, true, 0.5, 4, 50, 300) + if index == 3: # Medium + world_environment.environment.ssil_enabled = true + RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_MEDIUM, true, 0.5, 4, 50, 300) + if index == 4: # High + world_environment.environment.ssil_enabled = true + RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_HIGH, true, 0.5, 4, 50, 300) func _on_sdfgi_option_button_item_selected(index: int) -> void: @@ -162,9 +187,13 @@ func _on_sdfgi_option_button_item_selected(index: int) -> void: # If your game requires you to change the environment, # then be sure to run this function again to set the settings correct. if index == 0: # Disabled - world_environment.environment.set_sdfgi_enabled(false) - elif index == 1: # Enabled - world_environment.environment.set_sdfgi_enabled(true) + world_environment.environment.sdfgi_enabled = false + if index == 1: # Low + world_environment.environment.sdfgi_enabled = true + RenderingServer.gi_set_use_half_resolution(true) + if index == 2: # High + world_environment.environment.sdfgi_enabled = true + RenderingServer.gi_set_use_half_resolution(false) func _on_glow_option_button_item_selected(index: int) -> void: @@ -172,9 +201,24 @@ func _on_glow_option_button_item_selected(index: int) -> void: # If your game requires you to change the environment, # then be sure to run this function again to set the settings correct. if index == 0: # Disabled - world_environment.environment.set_glow_enabled(false) - elif index == 1: # Enabled - world_environment.environment.set_glow_enabled(true) + world_environment.environment.glow_enabled = false + if index == 1: # Low + world_environment.environment.glow_enabled = true + RenderingServer.environment_glow_set_use_high_quality(false) + if index == 2: # High + world_environment.environment.glow_enabled = true + RenderingServer.environment_glow_set_use_high_quality(true) + + +func _on_volumetric_fog_option_button_item_selected(index: int) -> void: + if index == 0: # Disabled + world_environment.environment.volumetric_fog_enabled = false + if index == 1: # Low + world_environment.environment.volumetric_fog_enabled = true + RenderingServer.environment_set_volumetric_fog_filter_active(false) + if index == 2: # High + world_environment.environment.volumetric_fog_enabled = true + RenderingServer.environment_set_volumetric_fog_filter_active(true) func _on_brightness_slider_value_changed(value: float) -> void: