You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
599 B
Plaintext

shader_type spatial;
render_mode blend_add,unshaded,depth_test_disabled,cull_disabled;
uniform sampler2D tex_main : source_color;
uniform sampler2D tex_noise : source_color;
uniform sampler2D tex_mask : source_color;
void fragment() {
vec2 uv = clamp(UV,vec2(0.01,0.01),vec2(0.99,0.99));
vec2 uv_noise = uv - 0.5 * vec2(mod(TIME, 2.0) - 1.0, 0);
vec4 col_main = texture(tex_main, uv);
vec4 col_noise = texture(tex_noise, uv_noise);
vec4 col_mask = texture(tex_mask, uv);
vec4 col = col_mask * COLOR * 1.0 + (col_noise + col_main) * COLOR;
ALBEDO = col.rgb;
ALPHA = col_mask.r * COLOR.a;
}