shader_type canvas_item;

uniform float speed = 4.0;
uniform float scale = 8.0;
uniform vec4 color_a: source_color = vec4(1.,1.,1.,1.);
uniform vec4 color_b: source_color = vec4(0.,0.,0.,1.);

void fragment() {
    vec2 uv = FRAGCOORD.xy;
    float t = .5 + sin((uv.x + uv.y) / scale + TIME * speed) * .5;
	t -= .5 + sin((uv.x - uv.y) / scale + TIME * speed) * .5;
	vec3 tvec = vec3(t,t,t);
    COLOR = tvec.x > 0.0 ? color_a : color_b;
}