How to smoothly change the texture of canvas item?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Taburetk

I make a runner-game. I have a background that scrolls with a shader. I want to smoothly change the background texture (like in Terraria). How can I do this?enter image description here

:bust_in_silhouette: Reply From: kidscancode

Use two textures (Sprite or TextureRect) and use an AnimationPlayer or Tween to change the modulate.a (ie transparency) property of each - one from 1 to 0 and the other from 0 to 1.

It seems this is the only solution. Thanks!

Taburetk | 2020-01-09 14:44