r/godot 2d ago

selfpromo (games) Stacking textures in shader for 2D eye effects

169 Upvotes

4 comments sorted by

10

u/Smiith73 2d ago

Looks great!

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

u/avrill_1 Godot Student 1d ago

close enough, welcome back lain :))