can a shader affect just a region of a sprite ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MrMonk
:warning: Old Version Published before Godot 3 was released.

Hi guys,
Is it possible to create a 2d shader that will only affect a specific region of a sprite ? How ?
thanks !

:bust_in_silhouette: Reply From: Gokudomatic2

Try to use a mask. For what I understand from shaders, you can’t control the loop that goes through each pixel. But with a mask, you can manipulate specific parts of the texture.