Simple tiled texture scroll
Applies simple vertex-based UV scrolling for any canvasitem. When used on a textured node, creates a scrolling texture effect. Can be used with sprites or texturerects to create scrolling texture rectangles. Can be used with a meshinstance2d to create free-form cutouts of scrolling texture. May have other uses if you’re clever. Tiles in both dimensions.
NOTE: if using with a texture, texture must have repeat enabled.
Motion: controls scrolling, in pixels.
Offset: fixed texture offset, also in pixels.
Scale: scale multiplier for the texture. 1.0 means 1 texture pixel is mapped to 1 pixel of local space. Must not be zero.
Shader code
shader_type canvas_item;
uniform vec2 motion = vec2(0.0);
uniform float scale = 1.0;
uniform vec2 offset = vec2(0.0);
void vertex(){
UV = (VERTEX + offset + TIME * motion) * TEXTURE_PIXEL_SIZE * (1.0/scale);
}
ultra thanks!!!!!!!