diff options
| author | davidovski <david@davidovski.xyz> | 2025-12-12 18:21:49 +0000 |
|---|---|---|
| committer | davidovski <david@davidovski.xyz> | 2025-12-12 18:21:49 +0000 |
| commit | 99e7720e5c8520960d186a88f92a48ca4ff81bc3 (patch) | |
| tree | b5e127cc9d026b5108bca6f6b7bf43c9f834c3a9 | |
| parent | b32a775ce1835b4a3910c36b088f75c62d480e58 (diff) | |
| -rw-r--r-- | config/picom/picom.conf | 2 | ||||
| -rw-r--r-- | config/picom/shaders/glitch_animation.glsl | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/config/picom/picom.conf b/config/picom/picom.conf index fbe89c1..87c0383 100644 --- a/config/picom/picom.conf +++ b/config/picom/picom.conf @@ -94,7 +94,7 @@ frame-opacity = 0.7; # `transparent-clipping`. # # Default: 0 (disabled) -corner-radius = 5 +corner-radius = 0 ################################# # Blur # diff --git a/config/picom/shaders/glitch_animation.glsl b/config/picom/shaders/glitch_animation.glsl index ee2ae8f..801fc93 100644 --- a/config/picom/shaders/glitch_animation.glsl +++ b/config/picom/shaders/glitch_animation.glsl @@ -7,6 +7,8 @@ float hue = 0.3; float block_max = 500; float block_min = 200; +float pixelate_size = 3; + in vec2 texcoord; // texture coordinate of the fragment uniform sampler2D tex; // texture of the window @@ -35,6 +37,15 @@ float rand_offset(float b, float off) { return (random(b*64) - 0.5) * (off*2); } +vec4 alpha_effect(vec4 pix, vec2 coord) { + if (random(coord.x * random(coord.y / 100)) < pix.w) { + pix.w = 1; + return pix; + } + return vec4(0, 0, 0, 0); + +} + vec3 hueShift( vec3 color, float hueAdjust ){ const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114); @@ -96,7 +107,7 @@ vec4 anim(float alpha) { // Set the new color vec4 c; - c.w = texelFetch(tex, ivec2(uvr), 0).w; + c.xyz = offset_color; return c; @@ -107,6 +118,9 @@ vec4 window_shader() { c = default_post_processing(c); float opacity = opacity_threshold(c.w); c = anim(opacity); - return default_post_processing(c); + c.w = opacity; + c = alpha_effect(c, ceil(texcoord / pixelate_size) * pixelate_size); + //c = default_post_processing(c); + return c; } |
