diff options
| author | Nippy <nippy@Nippy-Mac-mini.local> | 2026-10-09 17:23:53 +0200 |
|---|---|---|
| committer | Nippy <nippy@Nippy-Mac-mini.local> | 2026-10-09 17:23:53 +0200 |
| commit | 9d5be1660d8f74038ebed3d74fdbc809e43787ae (patch) | |
| tree | 4cb46c3765be87ca4c5219f2f714425d7dfddb56 /raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl | |
| parent | deb4b8a9c407832c35100a643bd7a592589c9679 (diff) | |
| download | RaveOS-PKGBUILD-9d5be1660d8f74038ebed3d74fdbc809e43787ae.tar.gz RaveOS-PKGBUILD-9d5be1660d8f74038ebed3d74fdbc809e43787ae.zip | |
gnome fix
Diffstat (limited to 'raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl')
| -rw-r--r-- | raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl index 809cc93..2bc641f 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl +++ b/raveos-gnome-theme/theme-data/extensions/installed/blur-my-shell@aunetx/effects/gaussian_blur.glsl @@ -6,30 +6,35 @@ uniform float width; uniform float height; vec4 getTexture(vec2 uv) { - if (uv.x < 3. / width) - uv.x = 3. / width; + float w = max(1.0, width); + float h = max(1.0, height); - if (uv.y < 3. / height) - uv.y = 3. / height; + if (uv.x < 3. / w) + uv.x = 3. / w; - if (uv.x > 1. - 3. / width) - uv.x = 1. - 3. / width; + if (uv.y < 3. / h) + uv.y = 3. / h; - if (uv.y > 1. - 3. / height) - uv.y = 1. - 3. / height; + if (uv.x > 1. - 3. / w) + uv.x = 1. - 3. / w; + + if (uv.y > 1. - 3. / h) + uv.y = 1. - 3. / h; return texture2D(tex, uv); } void main(void) { vec2 uv = cogl_tex_coord_in[0].xy; - vec2 direction = vec2(dir, (1.0 - dir)); + vec2 direction = vec2(float(dir), 1.0 - float(dir)); + float w = max(1.0, width); + float h = max(1.0, height); float pixel_step; if (dir == 0) - pixel_step = 1.0 / height; + pixel_step = 1.0 / h; else - pixel_step = 1.0 / width; + pixel_step = 1.0 / w; vec3 gauss_coefficient; gauss_coefficient.x = 1.0 / (sqrt(2.0 * 3.14159265) * sigma); @@ -67,4 +72,4 @@ void main(void) { } cogl_color_out = outColor; -}
\ No newline at end of file +} |