diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-01-23 01:14:28 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-01-23 01:14:28 +0100 |
commit | 4ac963533bd7e538febf001cc158fcbd46f0267a (patch) | |
tree | b975148ff9a0a9729d8dd57cf7905dcfa411190d /shaders | |
parent | 0c71b0a9deb822c2acb89efdc21397fc195e82bf (diff) |
4chan: do not reset comment navigation on next video, fix alpha color in rounded rectangle shader
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/rounded_rectangle.glsl | 2 | ||||
-rw-r--r-- | shaders/rounded_rectangle_no_shadow.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
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 |