-// MULTIPLY
-static const char *blend_multiply_frag =
- " vec4 result = dst_color * src_color;\n";
-
-// DIVIDE
-static const char *blend_divide_frag =
- " vec4 result = dst_color / src_color;\n"
- " if(src_color.r == 0.) result.r = 1.0;\n"
- " if(src_color.g == 0.) result.g = 1.0;\n"
- " if(src_color.b == 0.) result.b = 1.0;\n"
- " if(src_color.a == 0.) result.a = 1.0;\n"
- " result = clamp(result, 0.0, 1.0);\n";
-
-// MAX
-static const char *blend_max_frag =
- " vec4 result = max(src_color, dst_color);\n";
-
-// MIN
-static const char *blend_min_frag =
- " vec4 result = min(src_color, dst_color);\n";
-
-// AVERAGE
-static const char *blend_average_frag =
- " vec4 result = (src_color + dst_color) * 0.5;\n";
-
-// DARKEN
-static const char *blend_darken_frag =
- " vec4 result = vec4(src_color.rgb * (1.0 - dst_color.a) +"
- " dst_color.rgb * (1.0 - src_color.a) +"
- " min(src_color.rgb, dst_color.rgb), "
- " src_color.a + dst_color.a - src_color.a * dst_color.a);\n"
- " result = clamp(result, 0.0, 1.0);\n";
-
-// LIGHTEN
-static const char *blend_lighten_frag =
- " vec4 result = vec4(src_color.rgb * (1.0 - dst_color.a) +"
- " dst_color.rgb * (1.0 - src_color.a) +"
- " max(src_color.rgb, dst_color.rgb), "
- " src_color.a + dst_color.a - src_color.a * dst_color.a);\n"
- " result = clamp(result, 0.0, 1.0);\n";
-
-// DST
-static const char *blend_dst_frag =
- " vec4 result = dst_color;\n";
-
-// DST_ATOP
-static const char *blend_dst_atop_frag =
- " vec4 result = vec4(src_color.rgb * dst_color.a + "
- "(1.0 - src_color.a) * dst_color.rgb, dst_color.a);\n";
-
-// DST_IN
-static const char *blend_dst_in_frag =
- " vec4 result = src_color * dst_color.a;\n";
-
-// DST_OUT
-static const char *blend_dst_out_frag =
- " vec4 result = src_color * (1.0 - dst_color.a);\n";
-
-// DST_OVER
-static const char *blend_dst_over_frag =
- " vec4 result = vec4(src_color.rgb + (1.0 - src_color.a) * dst_color.rgb, "
- " dst_color.a + src_color.a - dst_color.a * src_color.a);\n";
-
-// SRC
-static const char *blend_src_frag =