2025-05-13 19:22:01 +08:00

19 lines
437 B
Plaintext

shader_type canvas_item;
uniform vec2 motion = vec2(0.0);
uniform float scale = 1.0;
uniform float multiplier = 1.0;
uniform vec2 offset = vec2(0.0);
uniform bool manual = false;
void vertex(){
if(manual){
UV = (VERTEX + offset + (multiplier * motion)) * TEXTURE_PIXEL_SIZE * (1.0/scale);
}else{
UV = (VERTEX + offset + (TIME * motion)) * TEXTURE_PIXEL_SIZE * (1.0/scale);
}
}
void fragment(){
COLOR *= texture(TEXTURE, UV);
}