A Godot Engine app to help streamers organize Majority Judgment polls in their streams.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

69 lines
1.3 KiB

shader_type canvas_item;
uniform sampler2D grade_icon;
uniform bool is_median = false;
void fragment() {
vec4 final_color = COLOR;
vec4 texture_color_waves1 = texture(grade_icon, UV*(1.0+sin(FRAGCOORD.x*0.013+TIME+FRAGCOORD.y*0.05)));
final_color.rgb = mix(
final_color.rgb,
final_color.rgb * 0.97,
texture_color_waves1.a
);
vec4 texture_color_waves2 = texture(grade_icon, vec2(UV.x*1.2-0.1, float(int(FRAGCOORD.y+TIME*23.0)%60)/50.0));
final_color.rgb = mix(
final_color.rgb,
final_color.rgb * 0.95,
texture_color_waves2.a
);
int step_size_x = 7;
int step_size_y = 9;
vec4 texture_color_waves3 = texture(grade_icon, vec2(
float(int(FRAGCOORD.x-TIME*3.0)%step_size_x)/float(step_size_x-1),
1.0-float(int(FRAGCOORD.y-TIME)%step_size_y)/float(step_size_y-1)
));
final_color.rgb = mix(
final_color.rgb,
final_color.rgb * 0.91,
texture_color_waves3.a
);
// Stretched
vec4 texture_color_base = texture(grade_icon, UV);
final_color.rgb = mix(
final_color.rgb,
final_color.rgb * 0.85,
texture_color_base.a
);
if (is_median) {
float border_size = 0.07;
if (
(UV.x > 1.0 - border_size)
||
(UV.x < border_size)
||
(UV.y > 1.0 - border_size)
||
(UV.y < border_size)
) {
final_color.rgb = vec3(1.0, 1.0, 1.0);
}
}
COLOR = final_color;
}