how to run a shader with a event

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ARSHAVIR_GM

for example you got a shader and you want to run shader with a key (for example space)
how to do it

:bust_in_silhouette: Reply From: exuin

You could possibly just have a material resource saved in res:// and just set it or remove it when the key is pressed. There might be a more efficient way but I couldn’t find a way to disable a material while still having it.