Color shader does nothing on an AnimatedSprite2D

Godot Version

4.3rc3

Question

i have 2 sprites, one boring, one animated. i want to change their color with a shader (using one from a tutorial). Works with the boring one, does literally nothing with the animated one.
image

shader_type canvas_item;
uniform vec4 blink_color: source_color;
uniform float blink_intensity : hint_range(0.0, 1.0, 0.1);
void fragment() {
	vec4 color = texture(TEXTURE, UV);
	color = mix(color, blink_color, blink_intensity * color.a);
	COLOR = color;
}

In doing my research i see a lot of posts that Godot shaders don’t work with animated sprites and the suggestions have been to write your own custom animated sprite class but that can’t possibly be true.

i’ve also read that Godot’s shaders don’t work correctly with animated sprites because they use the texture from the sprite sheet rather than the sprite and that throws off the coordinates but this is a blanket “turn everything white” shader so if it turns the entire sprite sheet white it wouldn’t matter. But i’m seeing literally nothing.

i think my question was wrong. One of my AnimatedSprite2Ds wouldn’t work with a shader but i tried to replicate the problem with another animation and couldn’t. So this might just be a me problem. i tried to delete my post but the system says there was a problem and to ask an admin to delete it. Sorry everyone.

Oh hey, i figured it out on my own!

Shaders don’t seem to work with AnimatedSprite2D but they do work with custom scenes that are just AnimatedSprite2D. So if i move Guybrush into his own scene, suddenly the shader starts working. That is bizarre and confusing and not something i saw documented anywhere in an hour of googling.

image

Haven’t tried this yet with any other kind of shader but it fixes it for coloring.