mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-11 06:24:45 +00:00
👽 interstellar delivery
This commit is contained in:
parent
547c97bfba
commit
97c8292858
257 changed files with 7309 additions and 4637 deletions
32
interfaces/menus/boot/settings/scripts/filters.gd
Normal file
32
interfaces/menus/boot/settings/scripts/filters.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("video", "filter"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("video", "filter", index)
|
||||
# Viewport scale mode setting.
|
||||
if index == 0: # Bilinear (Fastest)
|
||||
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_BILINEAR
|
||||
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
|
||||
%FSRSharpnessLabel.visible = false
|
||||
%FSRSharpnessSlider.visible = false
|
||||
elif index == 1: # FSR 1.0 (Fast)
|
||||
get_viewport().scaling_3d_mode = Viewport.SCALING_3D_MODE_FSR
|
||||
# FSR Sharpness is only effective when the scaling mode is FSR 1.0.
|
||||
%FSRSharpnessLabel.visible = true
|
||||
%FSRSharpnessSlider.visible = true
|
||||
39
interfaces/menus/boot/settings/scripts/fov.gd
Normal file
39
interfaces/menus/boot/settings/scripts/fov.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends HBoxContainer
|
||||
|
||||
@export var min_value : int = 70
|
||||
@export var max_value : int = 150
|
||||
@export var step : int = 1
|
||||
|
||||
func _ready() -> void:
|
||||
var value : int = Settings.get_value("video", "fov")
|
||||
for control : Range in [$SpinBox, $Slider]:
|
||||
control.min_value = min_value
|
||||
control.max_value = max_value
|
||||
control.step = step
|
||||
control.value = value
|
||||
_on_value_changed(value)
|
||||
|
||||
func _on_value_changed(new_value : int) -> void:
|
||||
Settings.set_value("video", "fov", new_value)
|
||||
#
|
||||
func _on_spin_box_value_changed(new_value : int) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$Slider.value = new_value
|
||||
#
|
||||
func _on_slider_value_changed(new_value : int) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$SpinBox.value = new_value
|
||||
26
interfaces/menus/boot/settings/scripts/fsr_sharpness.gd
Normal file
26
interfaces/menus/boot/settings/scripts/fsr_sharpness.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends HSlider
|
||||
|
||||
func _ready() -> void:
|
||||
self.value = Settings.get_value("video", "fsr_sharpness")
|
||||
self.value_changed.emit(self.value)
|
||||
|
||||
func _on_value_changed(new_value : float) -> void:
|
||||
Settings.set_value("video", "fsr_sharpness", new_value)
|
||||
# Lower FSR sharpness values result in a sharper image.
|
||||
# Invert the slider so that higher values result in a sharper image,
|
||||
# which is generally expected from users.
|
||||
get_viewport().fsr_sharpness = 2.0 - new_value
|
||||
24
interfaces/menus/boot/settings/scripts/fxaa.gd
Normal file
24
interfaces/menus/boot/settings/scripts/fxaa.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("video", "fxaa"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("video", "fxaa", index)
|
||||
# Fast approximate anti-aliasing. Much faster than MSAA (and works on alpha scissor edges),
|
||||
# but blurs the whole scene rendering slightly.
|
||||
get_viewport().screen_space_aa = int(index == 1) as Viewport.ScreenSpaceAA
|
||||
30
interfaces/menus/boot/settings/scripts/glow.gd
Normal file
30
interfaces/menus/boot/settings/scripts/glow.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("environment", "glow"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "glow", index)
|
||||
## 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 make the setting effective.
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.glow_enabled = false
|
||||
elif index == 1: # Low
|
||||
Game.environment.glow_enabled = true
|
||||
elif index == 2: # High
|
||||
Game.environment.glow_enabled = true
|
||||
32
interfaces/menus/boot/settings/scripts/mesh_lod.gd
Normal file
32
interfaces/menus/boot/settings/scripts/mesh_lod.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("quality", "mesh_lod"))
|
||||
|
||||
func _on_item_selected(index : int) -> void:
|
||||
Settings.set_value("quality", "mesh_lod", index)
|
||||
if index == 0: # Very Low
|
||||
get_viewport().mesh_lod_threshold = 8.0
|
||||
if index == 0: # Low
|
||||
get_viewport().mesh_lod_threshold = 4.0
|
||||
if index == 1: # Medium
|
||||
get_viewport().mesh_lod_threshold = 2.0
|
||||
if index == 2: # High (default)
|
||||
get_viewport().mesh_lod_threshold = 1.0
|
||||
if index == 3: # Ultra
|
||||
# Always use highest LODs to avoid any form of pop-in.
|
||||
get_viewport().mesh_lod_threshold = 0.0
|
||||
39
interfaces/menus/boot/settings/scripts/mouse_sensitivity.gd
Normal file
39
interfaces/menus/boot/settings/scripts/mouse_sensitivity.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends HBoxContainer
|
||||
|
||||
@export var min_value : float = .01
|
||||
@export var max_value : float = 1.
|
||||
@export var step : float = .01
|
||||
|
||||
func _ready() -> void:
|
||||
var value : float = Settings.get_value("controls", "mouse_sensitivity")
|
||||
for control : Range in [$SpinBox, $Slider]:
|
||||
control.min_value = min_value
|
||||
control.max_value = max_value
|
||||
control.step = step
|
||||
control.value = value
|
||||
_on_value_changed(value)
|
||||
|
||||
func _on_value_changed(new_value : float) -> void:
|
||||
Settings.set_value("controls", "mouse_sensitivity", new_value)
|
||||
|
||||
func _on_spin_box_value_changed(new_value : float) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$Slider.value = new_value
|
||||
|
||||
func _on_slider_value_changed(new_value : float) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$SpinBox.value = new_value
|
||||
31
interfaces/menus/boot/settings/scripts/msaa.gd
Normal file
31
interfaces/menus/boot/settings/scripts/msaa.gd
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("video", "msaa"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("video", "msaa", index)
|
||||
# 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 (default)
|
||||
get_viewport().msaa_3d = Viewport.MSAA_DISABLED
|
||||
elif index == 1: # 2×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_2X
|
||||
elif index == 2: # 4×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_4X
|
||||
elif index == 3: # 8×
|
||||
get_viewport().msaa_3d = Viewport.MSAA_8X
|
||||
40
interfaces/menus/boot/settings/scripts/quality.gd
Normal file
40
interfaces/menus/boot/settings/scripts/quality.gd
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends HBoxContainer
|
||||
|
||||
@export var min_value : float = 0.25
|
||||
@export var max_value : float = 2
|
||||
@export var step : float = .05
|
||||
|
||||
func _ready() -> void:
|
||||
var value : float = Settings.get_value("video", "quality")
|
||||
for control : Range in [$SpinBox, $Slider]:
|
||||
control.min_value = min_value
|
||||
control.max_value = max_value
|
||||
control.step = step
|
||||
control.value = value
|
||||
get_viewport().scaling_3d_scale = value
|
||||
|
||||
func _on_value_changed(new_value : float) -> void:
|
||||
Settings.set_value("video", "quality", new_value)
|
||||
get_viewport().scaling_3d_scale = new_value
|
||||
|
||||
func _on_spin_box_value_changed(new_value : float) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$Slider.value = new_value
|
||||
#
|
||||
func _on_slider_value_changed(new_value : float) -> void:
|
||||
_on_value_changed(new_value)
|
||||
$SpinBox.value = new_value
|
||||
32
interfaces/menus/boot/settings/scripts/sdfgi.gd
Normal file
32
interfaces/menus/boot/settings/scripts/sdfgi.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("environment", "sdfgi"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "sdfgi", index)
|
||||
# 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 make the setting effective.
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.sdfgi_enabled = false
|
||||
elif index == 1: # Low
|
||||
Game.environment.sdfgi_enabled = true
|
||||
RenderingServer.gi_set_use_half_resolution(true)
|
||||
elif index == 2: # High
|
||||
Game.environment.sdfgi_enabled = true
|
||||
RenderingServer.gi_set_use_half_resolution(false)
|
||||
39
interfaces/menus/boot/settings/scripts/shadow_filter.gd
Normal file
39
interfaces/menus/boot/settings/scripts/shadow_filter.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("quality", "shadow_filter"))
|
||||
|
||||
func _on_item_selected(index : int) -> void:
|
||||
Settings.set_value("quality", "shadow_filter", index)
|
||||
if index == 0: # Very Low
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_HARD)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_HARD)
|
||||
if index == 1: # Low
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_VERY_LOW)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_VERY_LOW)
|
||||
if index == 2: # Medium (default)
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_LOW)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_LOW)
|
||||
if index == 3: # High
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_MEDIUM)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_MEDIUM)
|
||||
if index == 4: # Very High
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_HIGH)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_HIGH)
|
||||
if index == 5: # Ultra
|
||||
RenderingServer.directional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_ULTRA)
|
||||
RenderingServer.positional_soft_shadow_filter_set_quality(RenderingServer.SHADOW_QUALITY_SOFT_ULTRA)
|
||||
56
interfaces/menus/boot/settings/scripts/shadow_size.gd
Normal file
56
interfaces/menus/boot/settings/scripts/shadow_size.gd
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("quality", "shadow_size"))
|
||||
|
||||
func _on_item_selected(index : int) -> void:
|
||||
Settings.set_value("quality", "shadow_size", index)
|
||||
if index == 0: # Minimum
|
||||
RenderingServer.directional_shadow_atlas_set_size(512, true)
|
||||
# Adjust shadow bias according to shadow resolution.
|
||||
# Higher resultions can use a lower bias without suffering from shadow acne.
|
||||
#Settings.set_value("quality", "shadow_bias", 0.06)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
|
||||
# Disable positional (omni/spot) light shadows entirely to further improve performance.
|
||||
# These often don't contribute as much to a scene compared to directional light shadows.
|
||||
get_viewport().positional_shadow_atlas_size = 0
|
||||
if index == 1: # Very Low
|
||||
RenderingServer.directional_shadow_atlas_set_size(1024, true)
|
||||
#Settings.set_value("quality", "shadow_bias", 0.04)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
get_viewport().positional_shadow_atlas_size = 1024
|
||||
if index == 2: # Low
|
||||
RenderingServer.directional_shadow_atlas_set_size(2048, true)
|
||||
#Settings.set_value("quality", "shadow_bias", 0.03)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
get_viewport().positional_shadow_atlas_size = 2048
|
||||
if index == 3: # Medium (default)
|
||||
RenderingServer.directional_shadow_atlas_set_size(4096, true)
|
||||
#Settings.set_value("quality", "shadow_bias", 0.02)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
get_viewport().positional_shadow_atlas_size = 4096
|
||||
if index == 4: # High
|
||||
RenderingServer.directional_shadow_atlas_set_size(8192, true)
|
||||
#Settings.set_value("quality", "shadow_bias", 0.01)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
get_viewport().positional_shadow_atlas_size = 8192
|
||||
if index == 5: # Ultra
|
||||
RenderingServer.directional_shadow_atlas_set_size(16384, true)
|
||||
#Settings.set_value("quality", "shadow_bias", 0.005)
|
||||
#directional_light.shadow_bias = Settings.get_value("quality", "shadow_bias")
|
||||
get_viewport().positional_shadow_atlas_size = 16384
|
||||
38
interfaces/menus/boot/settings/scripts/ssao.gd
Normal file
38
interfaces/menus/boot/settings/scripts/ssao.gd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("environment", "ssao"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "ssao", index)
|
||||
# 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 make the setting effective.
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.ssao_enabled = false
|
||||
elif index == 1: # Very Low
|
||||
Game.environment.ssao_enabled = true
|
||||
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
|
||||
elif index == 2: # Low
|
||||
Game.environment.ssao_enabled = true
|
||||
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_VERY_LOW, true, 0.5, 2, 50, 300)
|
||||
elif index == 3: # Medium
|
||||
Game.environment.ssao_enabled = true
|
||||
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_MEDIUM, true, 0.5, 2, 50, 300)
|
||||
elif index == 4: # High
|
||||
Game.environment.ssao_enabled = true
|
||||
RenderingServer.environment_set_ssao_quality(RenderingServer.ENV_SSAO_QUALITY_HIGH, true, 0.5, 2, 50, 300)
|
||||
38
interfaces/menus/boot/settings/scripts/ssil.gd
Normal file
38
interfaces/menus/boot/settings/scripts/ssil.gd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("environment", "ssil"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "ssil", index)
|
||||
# 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 make the setting effective.
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.ssil_enabled = false
|
||||
if index == 1: # Very Low
|
||||
Game.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
|
||||
Game.environment.ssil_enabled = true
|
||||
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_LOW, true, 0.5, 4, 50, 300)
|
||||
if index == 3: # Medium
|
||||
Game.environment.ssil_enabled = true
|
||||
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_MEDIUM, true, 0.5, 4, 50, 300)
|
||||
if index == 4: # High
|
||||
Game.environment.ssil_enabled = true
|
||||
RenderingServer.environment_set_ssil_quality(RenderingServer.ENV_SSIL_QUALITY_HIGH, true, 0.5, 4, 50, 300)
|
||||
35
interfaces/menus/boot/settings/scripts/ssr.gd
Normal file
35
interfaces/menus/boot/settings/scripts/ssr.gd
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("environment", "ssr"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "ssr", index)
|
||||
# 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 make the setting effective.
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.ssr_enabled = false
|
||||
elif index == 1: # Low
|
||||
Game.environment.ssr_enabled = true
|
||||
Game.environment.ssr_max_steps = 8
|
||||
elif index == 2: # Medium
|
||||
Game.environment.ssr_enabled = true
|
||||
Game.environment.ssr_max_steps = 32
|
||||
elif index == 3: # High
|
||||
Game.environment.ssr_enabled = true
|
||||
Game.environment.ssr_max_steps = 56
|
||||
26
interfaces/menus/boot/settings/scripts/taa.gd
Normal file
26
interfaces/menus/boot/settings/scripts/taa.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("video", "taa"))
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("video", "taa", index)
|
||||
# Temporal antialiasing. Smooths out everything including specular aliasing,
|
||||
# but can introduce ghosting artifacts and blurring in motion.
|
||||
# Moderate performance cost.
|
||||
# @WARNING: https://github.com/TokisanGames/Terrain3D/issues/302
|
||||
# get_viewport().use_taa = index == 1
|
||||
42
interfaces/menus/boot/settings/scripts/ui_scale.gd
Normal file
42
interfaces/menus/boot/settings/scripts/ui_scale.gd
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
self.selected = Settings.get_value("ui", "scale")
|
||||
self.item_selected.emit(self.selected)
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("ui", "scale", clamp(index, 0, 2))
|
||||
# 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 new_size := Vector2(
|
||||
ProjectSettings.get_setting(&"display/window/size/viewport_width"),
|
||||
ProjectSettings.get_setting(&"display/window/size/viewport_height")
|
||||
)
|
||||
# compute new size
|
||||
if index == 0: # Smaller (66%)
|
||||
new_size *= 1.5
|
||||
elif index == 1: # Small (80%)
|
||||
new_size *= 1.25
|
||||
elif index == 2: # Medium (100%) (default)
|
||||
new_size *= 1.
|
||||
elif index == 3: # Large (133%)
|
||||
new_size *= .75
|
||||
elif index == 4: # Larger (200%)
|
||||
new_size *= .5
|
||||
# update scale
|
||||
get_tree().root.set_content_scale_size(new_size)
|
||||
30
interfaces/menus/boot/settings/scripts/volumetric_fog.gd
Normal file
30
interfaces/menus/boot/settings/scripts/volumetric_fog.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
self.selected = Settings.get_value("environment", "volumetric_fog")
|
||||
self.item_selected.emit(self.selected)
|
||||
|
||||
func _on_item_selected(index: int) -> void:
|
||||
Settings.set_value("environment", "volumetric_fog", index)
|
||||
if index == 0: # Disabled (default)
|
||||
Game.environment.volumetric_fog_enabled = false
|
||||
if index == 1: # Low
|
||||
Game.environment.volumetric_fog_enabled = true
|
||||
RenderingServer.environment_set_volumetric_fog_filter_active(false)
|
||||
if index == 2: # High
|
||||
Game.environment.volumetric_fog_enabled = true
|
||||
RenderingServer.environment_set_volumetric_fog_filter_active(true)
|
||||
33
interfaces/menus/boot/settings/scripts/vsync.gd
Normal file
33
interfaces/menus/boot/settings/scripts/vsync.gd
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
select(Settings.get_value("video", "vsync"))
|
||||
|
||||
func _on_item_selected(index : int) -> void:
|
||||
Settings.set_value("video", "vsync", index)
|
||||
# Vsync is enabled by default.
|
||||
# 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 (default)
|
||||
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_DISABLED)
|
||||
elif index == 1: # Adaptive
|
||||
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ADAPTIVE)
|
||||
elif index == 2: # Enabled
|
||||
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED)
|
||||
28
interfaces/menus/boot/settings/scripts/window_mode.gd
Normal file
28
interfaces/menus/boot/settings/scripts/window_mode.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
extends OptionButton
|
||||
|
||||
func _ready() -> void:
|
||||
var window_mode : DisplayServer.WindowMode = Settings.get_value("video", "window_mode")
|
||||
select(DisplayServer.WINDOW_MODE_WINDOWED if OS.is_debug_build() else window_mode)
|
||||
|
||||
func _on_item_selected(index : int) -> void:
|
||||
Settings.set_value("video", "window_mode", clampi(index, 0, 2))
|
||||
if index == 0: # Windowed (default)
|
||||
get_tree().root.set_mode(Window.MODE_WINDOWED)
|
||||
elif index == 1: # Fullscreen
|
||||
get_tree().root.set_mode(Window.MODE_FULLSCREEN)
|
||||
elif index == 2: # Exclusive Fullscreen
|
||||
get_tree().root.set_mode(Window.MODE_EXCLUSIVE_FULLSCREEN)
|
||||
Loading…
Add table
Add a link
Reference in a new issue