Help me with the code please, Godot 4, MSAA simply doesn't give an error, but on the other hand it has no effect. This is a slide button:
func _on_msaa_value_changed(value):
match value:
0:
RenderingServer.viewport_set_msaa_2d(Viewport, RenderingServer.VIEWPORT_MSAA_DISABLED)
1:
RenderingServer.viewport_set_msaa_2d(Viewport, RenderingServer.VIEWPORT_MSAA_2X)
2:
RenderingServer.viewport_set_msaa_2d(Viewport, RenderingServer.VIEWPORT_MSAA_4X)
3:
RenderingServer.viewport_set_msaa_2d(Viewport, RenderingServer.VIEWPORT_MSAA_8X)
4:
RenderingServer.viewport_set_msaa_2d(Viewport, RenderingServer.VIEWPORT_MSAA_MAX)
Checkbox for FXAA:
func _on_fxaa_toggled(toggled_on):
if toggled_on:
get_viewport().SCREEN_SPACE_AA_FXAA
else:
RenderingServer.VIEWPORT_SCREEN_SPACE_AA_FXAA
Please help me, I'm a beginner at Godot