added a toggle option for motion blur

This commit is contained in:
sphynx-owner 2024-07-07 12:31:59 +03:00
commit 8861675341
3 changed files with 13 additions and 4 deletions

View file

@ -796,10 +796,11 @@ offset_left = -370.0
offset_bottom = 101.0 offset_bottom = 101.0
grow_horizontal = 0 grow_horizontal = 0
theme_override_constants/outline_size = 5 theme_override_constants/outline_size = 5
text = "up and down arrows: cycle through frame limits text = "Up and Down arrows: cycle through frame limits
left and right: cycle through pass counts Left and Right arrows: cycle through pass counts
z: toggle debug view Z: toggle debug view
x: freeze frame" X: freeze frame
T: Toggle motion blur"
[node name="WorldEnvironment" type="WorldEnvironment" parent="UI"] [node name="WorldEnvironment" type="WorldEnvironment" parent="UI"]
environment = ExtResource("33_vhloy") environment = ExtResource("33_vhloy")

View file

@ -55,6 +55,9 @@ func _input(event: InputEvent) -> void:
if Input.is_action_just_pressed("freeze"): if Input.is_action_just_pressed("freeze"):
motion_blur_effect.freeze = !motion_blur_effect.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: func _process(delta: float) -> void:
$"../Control/VBoxContainer/HBoxContainer2/fps".text = str(Engine.get_frames_per_second()) $"../Control/VBoxContainer/HBoxContainer2/fps".text = str(Engine.get_frames_per_second())

View file

@ -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) "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] [rendering]