From 4ac963533bd7e538febf001cc158fcbd46f0267a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 23 Jan 2022 01:14:28 +0100 Subject: 4chan: do not reset comment navigation on next video, fix alpha color in rounded rectangle shader --- shaders/rounded_rectangle.glsl | 2 +- shaders/rounded_rectangle_no_shadow.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'shaders') diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl index 40babe2..92accfd 100644 --- a/shaders/rounded_rectangle.glsl +++ b/shaders/rounded_rectangle.glsl @@ -14,5 +14,5 @@ void main() { float rect_dist = rounded_rect(uv - center, size, radius); float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0); float shadow_a = clamp(1.0 - smoothstep(0.0, shadow_offset.x, rect_dist), 0.0, 1.0); - gl_FragColor = mix(vec4(gl_Color.rgb, a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0)); + gl_FragColor = mix(vec4(gl_Color.rgb, gl_Color.a * a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0)); } \ No newline at end of file diff --git a/shaders/rounded_rectangle_no_shadow.glsl b/shaders/rounded_rectangle_no_shadow.glsl index b12b35c..fe8b48f 100644 --- a/shaders/rounded_rectangle_no_shadow.glsl +++ b/shaders/rounded_rectangle_no_shadow.glsl @@ -13,5 +13,5 @@ void main() { float rect_dist = rounded_rect(uv - center, size, radius); float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0); - gl_FragColor = vec4(gl_Color.rgb, a); + gl_FragColor = vec4(gl_Color.rgb, gl_Color.a * a); } \ No newline at end of file -- cgit v1.2.3