aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-11 18:24:14 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-11 18:24:14 +0200
commit0719ed5ad1affe7bf42c1677bd6a7148efa3eeda (patch)
tree8aa3624fae43d21abab7a29c7944e6e7fcd08a98
parent73c11f696ebfa27d0242b5e28486f8b5241a3a32 (diff)
Temporary fix for band
-rw-r--r--shaders/rounded_rectangle.glsl7
1 files changed, 5 insertions, 2 deletions
diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl
index d06a4ba..8ba138f 100644
--- a/shaders/rounded_rectangle.glsl
+++ b/shaders/rounded_rectangle.glsl
@@ -15,8 +15,11 @@ void main() {
float a = clamp(rounded_rect(uv - center, size - radius, radius), 0.0, 1.0);
// same as: if(uv.x >= band_pos.x && uv.x <= band_pos.x + band_size.x && uv.y >= band_pos.y && uv.y <= band_pos.y + band_size.y)
- vec2 band_blend = step(band_pos, uv) - step(band_pos + band_size, uv);
- vec4 front_color = mix(gl_Color, band_color, band_blend.x*band_blend.y);
+ //vec2 band_blend = step(band_pos, uv) - step(band_pos + band_size, uv);
+ //vec4 front_color = mix(gl_Color, band_color, band_blend.x*band_blend.y);
+ vec4 front_color = gl_Color;
+ if(uv.x >= band_pos.x && uv.x <= band_pos.x + band_size.x && uv.y >= band_pos.y && uv.y <= band_pos.y + band_size.y)
+ front_color = band_color;
front_color.a *= (1.0 - a);
gl_FragColor = front_color;
} \ No newline at end of file