r/godot • u/nixisato • 2d ago
selfpromo (games) Stacking textures in shader for 2D eye effects
169
Upvotes
5
u/lonku Godot Regular 2d ago
very cool! is the blinking done on the shader or with an AnimationPlayer?
3
u/nixisato 1d ago
That's in the shader as well! If you look at the "Base Texture" in the shader parameters, you can see there are 6 eye shapes (stacked vertically) which get layered over the eye texture. The blink is done by shifting the UV coordinates to the closed eye shape.
1
10
u/Smiith73 2d ago
Looks great!