CRT Shader Cancelling Out Mouse Inputs
Asked Answered
G

1

0

Hello! I'm currently developing an PC application with an early 2000's, CRT-era monitor effect. However, I'm running into an input issue after I apply the effect. Here's what the normal menu looks like:

I'm connecting the input of the mouse with a script if that's relevant. All six of the buttons function normally and respond correctly after they are clicked.

extends TextureButton

export (NodePath) var parent_path
signal button_pressed(button)

# Called when the node enters the scene tree for the first time.
func _ready():
	
	connect("pressed", self, "_on_pressed")
	connect("button_pressed", get_node(parent_path), "_on_menu_button_pressed") 

func _on_pressed(): 
	emit_signal("button_pressed", name)

I apply a shader effect by attaching a shader script (https://godotshaders.com/shader/vhs-and-crt-monitor-effect/) to a shaderMaterial to a ColorRect that's connected to the bottom of my Node tree. It covers the entire screen.

I've combed the comments of the shader, followed the instructions for troubleshooting from the CRT shader's author, but it's still cancelling all my mouse inputs.

Am I going about this the right way? Is there another way to achieve a similar post-processing CRT effect using another method I'm unfamiliar with? I'm open to suggestions and if there's any more information you need to help me resolve the issue I'd be happy to provide it.

Glenoid answered 15/8, 2022 at 20:7 Comment(0)
B
0

Make sure the mousefilter setting on the control node that applies the CRT emulating shader effect is set to pass on the mouse input and not block/capture it.

Bruges answered 15/8, 2022 at 20:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.