Files
GGJ26/menus/scenes/game_scene/configurable_sub_viewport.gd
minimata 44f251ed66
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 1m1s
Basic game template addon
2026-01-30 19:45:56 +01:00

13 lines
574 B
GDScript

extends SubViewport
## Script to apply the anti-aliasing setting from [PlayerConfig] to a [SubViewport].
## The name of the anti-aliasing variable in the [ConfigFile].
@export var anti_aliasing_key : StringName = "Anti-aliasing"
## The name of the section of the anti-aliasing variable in the [ConfigFile].
@export var video_section : StringName = AppSettings.VIDEO_SECTION
func _ready() -> void:
var anti_aliasing : int = PlayerConfig.get_config(video_section, anti_aliasing_key, Viewport.MSAA_DISABLED)
msaa_2d = anti_aliasing as MSAA
msaa_3d = anti_aliasing as MSAA