How to use a shader for a particular GUI node?

I would like to apply a grayscale effect for GUI node when user touch the node.
How to do it?

p.s.: I have a shader program, I’m interested in how to enable/disable shader by touch event.

1 Like

I don’t think you can use a shader for a particular node in a gui. Perhaps you could change the image on the box node using gui.play_flipbook()?

1 Like

I can change image on the node, I can change the colour of the node, etc.
I want to learn the shader technique in Defold. For example how to apply wave/blur effect for nodes/sprites?

Nodes and sprites are two completely different things. You can assign a material to a sprite and apply any kind of shader effect on anything with that material. You cannot do the same on an individual gui node, only on an entire gui scene.

2 Likes