From 9d5be1660d8f74038ebed3d74fdbc809e43787ae Mon Sep 17 00:00:00 2001 From: Nippy Date: Fri, 9 Oct 2026 17:23:53 +0200 Subject: gnome fix --- .../installed/blur-my-shell@aunetx/effects/luminosity.glsl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/luminosity.glsl') diff --git a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/luminosity.glsl b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/luminosity.glsl index 4c50ca4..e7cc855 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/luminosity.glsl +++ b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/luminosity.glsl @@ -4,6 +4,7 @@ uniform float brightness_multiplicator; uniform float contrast; uniform float contrast_center; uniform float saturation_multiplicator; +uniform float opacity_factor; vec3 hsl_to_rgb(vec3 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); @@ -24,10 +25,16 @@ vec3 rgb_to_hsl(vec3 c) { void main() { vec4 c = texture2D(tex, cogl_tex_coord_in[0].st); + if (c.a <= 0.0) { + cogl_color_out = c; + return; + } + vec3 pix_hsl = rgb_to_hsl(c.xyz) / c.a; pix_hsl.z = clamp(pix_hsl.z * brightness_multiplicator, 0., 1.); pix_hsl.z = clamp((pix_hsl.z - contrast_center) * contrast + contrast_center + brightness_shift, 0., 1.); pix_hsl.y = clamp(pix_hsl.y * saturation_multiplicator, 0., 1.); - cogl_color_out = vec4(hsl_to_rgb(pix_hsl) * c.a, c.a); -} \ No newline at end of file + vec4 effect_color = vec4(hsl_to_rgb(pix_hsl) * c.a, c.a); + cogl_color_out = mix(c, effect_color, opacity_factor); +} -- cgit v1.3