Merge pull request #288 from Calinou/3d-preview-enable-debanding

Enable debanding on the 3D preview if using Godot 3.2.4 or later
This commit is contained in:
Rodz Labs 2021-03-03 20:03:06 +01:00 committed by GitHub
commit 3db396d7ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ var _mouse_start_position := Vector2.ZERO
func _ready() -> void:
# Enable viewport debanding if running with Godot 3.2.4 or later.
# This mostly suppresses banding artifacts at a very small performance cost.
$MaterialPreview.set("debanding", true)
ui = get_node(ui_path)
get_node("/root/MainWindow").create_menus(MENU, self, ui)
$MaterialPreview/Preview3d/ObjectRotate.play("rotate")