Bubble-Blower/shaders/soap.gdshader
Marvin Dalheimer 0ab65e1df6
Init
2025-01-25 21:40:19 +01:00

16 lines
No EOL
333 B
Text

shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE: hint_screen_texture, filter_linear_mipmap;
void vertex() {
VERTEX += vec2(sin(TIME * 15.0f) * 7.5f, 0);
}
void fragment() {
vec4 pixel_color = texture(TEXTURE, UV);
if (pixel_color.a > 0.6f) {
vec4 new_color = vec4(0.2f, 0.1f, 0.3f, 0.4f);
COLOR = new_color;
}
}