From 886167534107375209ff41cbd0a8666e696b840d Mon Sep 17 00:00:00 2001 From: sphynx-owner Date: Sun, 7 Jul 2024 12:31:59 +0300 Subject: [PATCH] added a toggle option for motion blur --- MainScene.tscn | 9 +++++---- MotionBlurDebugScript/world_environment.gd | 3 +++ project.godot | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/MainScene.tscn b/MainScene.tscn index 5e3f965..b22ad11 100644 --- a/MainScene.tscn +++ b/MainScene.tscn @@ -796,10 +796,11 @@ offset_left = -370.0 offset_bottom = 101.0 grow_horizontal = 0 theme_override_constants/outline_size = 5 -text = "up and down arrows: cycle through frame limits -left and right: cycle through pass counts -z: toggle debug view -x: freeze frame" +text = "Up and Down arrows: cycle through frame limits +Left and Right arrows: cycle through pass counts +Z: toggle debug view +X: freeze frame +T: Toggle motion blur" [node name="WorldEnvironment" type="WorldEnvironment" parent="UI"] environment = ExtResource("33_vhloy") diff --git a/MotionBlurDebugScript/world_environment.gd b/MotionBlurDebugScript/world_environment.gd index 3670935..ec42370 100644 --- a/MotionBlurDebugScript/world_environment.gd +++ b/MotionBlurDebugScript/world_environment.gd @@ -55,6 +55,9 @@ func _input(event: InputEvent) -> void: if Input.is_action_just_pressed("freeze"): motion_blur_effect.freeze = !motion_blur_effect.freeze + + if Input.is_action_just_pressed("T"): + motion_blur_effect.enabled = !motion_blur_effect.enabled func _process(delta: float) -> void: $"../Control/VBoxContainer/HBoxContainer2/fps".text = str(Engine.get_frames_per_second()) diff --git a/project.godot b/project.godot index d8d3314..013f0f6 100644 --- a/project.godot +++ b/project.godot @@ -67,6 +67,11 @@ freeze={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null) ] } +T={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":84,"key_label":0,"unicode":103,"location":0,"echo":false,"script":null) +] +} [rendering]