mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-01-22 21:14:47 +00:00
32 lines
1.2 KiB
GDScript
32 lines
1.2 KiB
GDScript
# 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
|