Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Diet Estus |
I am trying to use a shader to scroll background images at different speeds in a scene.
My scene structure is:
Node2D
> Sprite1 (with shader)
>> AnimationPlayer (which animates uniforms of shader)
> Sprite2 (with shader)
>> AnimationPlayer (which animates uniforms of shader)
I am trying to use the same shader on each sprite, but to animate the uniforms of the shader separately for each sprite.
Unfortunately, even if I toggle resource_local_to_scene
for the shader material, it still applies to both Sprites
simultaneously. So both Sprites
are being affected by the other’s animation of the uniforms.
How can I animate the uniforms differently per Sprite
, all while using the same shader code?