From 60dd5bf659bb3a2b36f005014647df7c4e420e5b Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Mon, 9 Dec 2024 12:51:05 -0700 Subject: [PATCH] Added directional shadow settings --- assets/text/text.csv | 45 +++++---------- levels/debug_level/debug_level.tscn | 6 +- project.godot | 1 + .../camera/orbital_camera/orbital_camera.gd | 2 +- src/ui/menus/settings_menu/settings_menu.tscn | 57 +++++++++++++++++++ 5 files changed, 77 insertions(+), 34 deletions(-) diff --git a/assets/text/text.csv b/assets/text/text.csv index 0216b04..6f68621 100644 --- a/assets/text/text.csv +++ b/assets/text/text.csv @@ -46,36 +46,21 @@ SETTINGS_GRAPHICS_ANISOTROPIC_1,"2× (Faster)" SETTINGS_GRAPHICS_ANISOTROPIC_2,"4× (Fast)" SETTINGS_GRAPHICS_ANISOTROPIC_3,"8× (Average)" SETTINGS_GRAPHICS_ANISOTROPIC_4,"16× (Slow)" -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, -, +SETTINGS_GRAPHICS_LIGHTING_HEADING,"Light & Shadows" +SETTINGS_GRAPHICS_SHADOW_QUALITY,"Directional Shadow Quality (requires restart)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_0,"Lowest (256)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_1,"Low (2048)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_2,"Average (4096)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_3,"High (8192)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_4,"Higher (16384)" +SETTINGS_GRAPHICS_SHADOW_QUALITY_5,"Ultra (32768)" +SETTINGS_GRAPHICS_SHADOW_FILTER,"Directional Soft Shadow Filter Quality (requires restart)" +SETTINGS_GRAPHICS_SHADOW_FILTER_0,"Hard (Fastest)" +SETTINGS_GRAPHICS_SHADOW_FILTER_1,"Soft Very Low (Faster)" +SETTINGS_GRAPHICS_SHADOW_FILTER_2,"Soft Low (Fast)" +SETTINGS_GRAPHICS_SHADOW_FILTER_3,"Soft Medium (Average)" +SETTINGS_GRAPHICS_SHADOW_FILTER_4,"Soft High (Slow)" +SETTINGS_GRAPHICS_SHADOW_FILTER_5,"Soft Ultra (Slowest)" SETTINGS_AUDIO,Audio SETTINGS_AUDIO_HEADING,"Audio Settings" SETTINGS_CONTROLS,Controls diff --git a/levels/debug_level/debug_level.tscn b/levels/debug_level/debug_level.tscn index f05a797..e740d14 100644 --- a/levels/debug_level/debug_level.tscn +++ b/levels/debug_level/debug_level.tscn @@ -5,8 +5,8 @@ [ext_resource type="Texture2D" uid="uid://c47ern0l2d50r" path="res://assets/vista_2.png" id="6_ectru"] [ext_resource type="Texture2D" uid="uid://con5a36t6n6sq" path="res://assets/textures/clear_sea_water_2048x2048.png" id="7_t86h2"] [ext_resource type="Script" path="res://src/world/ball_zone/ball_zone.gd" id="9_jwlau"] +[ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="10_8tu3b"] [ext_resource type="PackedScene" uid="uid://dagh38vap4t1d" path="res://src/props/scenery/city/concrete_building_1.tscn" id="10_lf15j"] -[ext_resource type="PackedScene" uid="uid://cy7t2tc4y3b4" path="res://src/player/shot_setup/shot_setup.tscn" id="10_vvckc"] [ext_resource type="PackedScene" uid="uid://cjubxs7peir5k" path="res://src/props/scenery/city/kana_signboard.tscn" id="11_evxup"] [ext_resource type="PackedScene" uid="uid://di7aql54lksn7" path="res://src/props/scenery/trees/palm_tree/palm_tree.tscn" id="12_sswxf"] [ext_resource type="PackedScene" uid="uid://c7l58wuuahn7w" path="res://src/props/flag/flag.tscn" id="13_6jtao"] @@ -380,8 +380,8 @@ draw_pass_1 = SubResource("QuadMesh_l4j8a") [node name="DemoCamera" type="Camera3D" parent="Course" groups=["DemoCamera"]] transform = Transform3D(-0.734269, 0.305072, -0.606448, 0, 0.893336, 0.44939, 0.678858, 0.329973, -0.655949, 143.463, 90.0707, 223.738) -[node name="ShotSetup" parent="Course" instance=ExtResource("10_vvckc")] -transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 537.767, 4, 452.434) +[node name="GfolfGirl" parent="Course" instance=ExtResource("10_8tu3b")] +transform = Transform3D(0.909686, 0, 0.415297, 0, 1, 0, -0.415297, 0, 0.909686, 537.767, 4, 452.434) [node name="CityBuildings" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) diff --git a/project.godot b/project.godot index 7a2fcf0..f80870e 100644 --- a/project.godot +++ b/project.godot @@ -242,4 +242,5 @@ jolt_3d/limits/max_temporary_memory=64 [rendering] textures/canvas_textures/default_texture_filter=0 +lights_and_shadows/directional_shadow/size=8192 lights_and_shadows/directional_shadow/soft_shadow_filter_quality=3 diff --git a/src/ui/camera/orbital_camera/orbital_camera.gd b/src/ui/camera/orbital_camera/orbital_camera.gd index 40f1ac4..c942572 100644 --- a/src/ui/camera/orbital_camera/orbital_camera.gd +++ b/src/ui/camera/orbital_camera/orbital_camera.gd @@ -2,7 +2,7 @@ class_name OrbitalCamera extends Node3D const POSITION_ACCELERATION := 4.0 const BASIS_ACCELERATION := 4.0 -const TARGETER_ACCELERATION := 4.0 +const TARGETER_ACCELERATION := 8.0 @export var target: Node3D @export var offset := Vector3(0, 1, 0) diff --git a/src/ui/menus/settings_menu/settings_menu.tscn b/src/ui/menus/settings_menu/settings_menu.tscn index 63e8225..1b6e5d6 100644 --- a/src/ui/menus/settings_menu/settings_menu.tscn +++ b/src/ui/menus/settings_menu/settings_menu.tscn @@ -304,6 +304,61 @@ popup/item_3/id = 3 popup/item_4/text = "SETTINGS_GRAPHICS_ANISOTROPIC_4" popup/item_4/id = 4 +[node name="LightingHeading" type="HBoxContainer" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList"] +layout_mode = 2 + +[node name="Label" type="Label" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/LightingHeading"] +layout_mode = 2 +theme_type_variation = &"HeaderMedium" +text = "SETTINGS_GRAPHICS_LIGHTING_HEADING" + +[node name="HSeparator" type="HSeparator" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/LightingHeading"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="DirectionalShadowQuality" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList" groups=["Settings"] instance=ExtResource("4_g7eck")] +layout_mode = 2 +key = &"rendering/lights_and_shadows/directional_shadow/size" + +[node name="SettingLabel" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowQuality" index="1"] +text = "SETTINGS_GRAPHICS_SHADOW_QUALITY" + +[node name="Dropdown" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowQuality/PanelContainer/MarginContainer" index="0"] +item_count = 6 +popup/item_0/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_0" +popup/item_0/id = 256 +popup/item_1/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_1" +popup/item_1/id = 2048 +popup/item_2/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_2" +popup/item_2/id = 4096 +popup/item_3/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_3" +popup/item_3/id = 8192 +popup/item_4/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_4" +popup/item_4/id = 16384 +popup/item_5/text = "SETTINGS_GRAPHICS_SHADOW_QUALITY_5" +popup/item_5/id = 32768 + +[node name="DirectionalShadowFilter" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList" groups=["Settings"] instance=ExtResource("4_g7eck")] +layout_mode = 2 +key = &"rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality" + +[node name="SettingLabel" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowFilter" index="1"] +text = "SETTINGS_GRAPHICS_SHADOW_FILTER" + +[node name="Dropdown" parent="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowFilter/PanelContainer/MarginContainer" index="0"] +item_count = 6 +popup/item_0/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_0" +popup/item_1/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_1" +popup/item_1/id = 1 +popup/item_2/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_2" +popup/item_2/id = 2 +popup/item_3/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_3" +popup/item_3/id = 3 +popup/item_4/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_4" +popup/item_4/id = 4 +popup/item_5/text = "SETTINGS_GRAPHICS_SHADOW_FILTER_5" +popup/item_5/id = 5 + [node name="SETTINGS_AUDIO" type="MarginContainer" parent="TabContainer"] visible = false layout_mode = 2 @@ -423,3 +478,5 @@ text = "UI_ACCEPT" [editable path="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/TAA"] [editable path="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/Debanding"] [editable path="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/AnisotropicLevel"] +[editable path="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowQuality"] +[editable path="TabContainer/SETTINGS_GRAPHICS/VBoxContainer/ScrollContainer/MarginContainer/SettingsList/DirectionalShadowFilter"]