shader_type spatial; render_mode unshaded,cull_disabled; uniform sampler2D tex_main : source_color; uniform sampler2D tex_noise : source_color; void fragment() { vec4 col = texture(tex_main, UV); float noise_alpha = texture(tex_noise, UV).r; if (COLOR.a >= noise_alpha){ noise_alpha = 1.0; } ALBEDO = COLOR.rgb; ALPHA = COLOR.a * col.r * noise_alpha; }