Skip to content

Commit 9477d03

Browse files
authored
Add shaders (#42)
* Add shaders using hyprshade * Delete a few shaders * Fix nit
1 parent e805fa1 commit 9477d03

94 files changed

Lines changed: 4637 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ A visual theming application for Omarchy. Create beautiful desktop themes throug
1919
- **Color Lock System** - Protect specific colors while experimenting with adjustments
2020
- **Blueprint System** - Save and share themes as JSON files
2121
- **Neovim Themes** - 37 LazyVim-compatible themes with preset matching
22+
- **Shader Manager** - 80+ GLSL screen shaders for hyprshade (color grading, effects, era vibes)
2223
- **Accessibility Checker** - Real-time WCAG contrast ratio validation
2324
- **Customizable UI** - Live theme reload and CSS variable system
2425
- **Multi-App Support** - Hyprland, Waybar, Kitty, Alacritty, btop, Mako, and 15+ more applications
@@ -30,6 +31,7 @@ A visual theming application for Omarchy. Create beautiful desktop themes throug
3031
- Libadwaita 1
3132
- libsoup3 - HTTP client library for wallhaven API
3233
- **ImageMagick** - Intelligent color extraction and image filter processing
34+
- **hyprshade** - Screen shader manager (optional, for shader effects)
3335
- **Omarchy** - Distro
3436

3537
## Installation
@@ -107,6 +109,31 @@ Example:
107109

108110
Changes apply instantly via live reload.
109111

112+
### Screen Shaders
113+
114+
Aether includes many GLSL screen shaders for hyprshade. Shaders are automatically installed to `~/.config/hypr/shaders/` when you run Aether. Use the Shader Manager in the Settings sidebar to toggle effects, or bind them directly in your Hyprland config.
115+
116+
**Shader Location:** `~/.config/hypr/shaders/`
117+
118+
Add your own `.glsl` files to this directory and they will automatically appear in the Shader Manager list. For GLSL shader tutorials, see [The Book of Shaders](https://thebookofshaders.com/), [Shadertoy](https://www.shadertoy.com/), or [LearnOpenGL - Shaders](https://learnopengl.com/Getting-started/Shaders).
119+
120+
**Manual Binding Example:**
121+
```conf
122+
# In ~/.config/hypr/hyprland.conf
123+
bind = $mainMod, F1, exec, hyprshade toggle grayscale
124+
bind = $mainMod, F2, exec, hyprshade toggle retro-glow
125+
bind = $mainMod, F3, exec, hyprshade off
126+
```
127+
128+
**Shader Categories:**
129+
- Color corrections (grayscale, sepia, duotone, tritone)
130+
- Temperature adjustments (warm-tone, cool-tone, amber, blue-light-reduce)
131+
- Saturation effects (saturate, desaturate, color-pop, pastel)
132+
- Era vibes (40s, 50s, 60s, 70s, 80s, 90s, 00s)
133+
- Artistic looks (golden-hour, cyberpunk-neon, vintage-film, faded-memory)
134+
- Nature themes (forest-green, ocean, arctic-blue, desert-sand, autumn-leaves)
135+
- Accessibility (protanopia, deuteranopia, tritanopia, high-contrast)
136+
110137
### Color Extraction Algorithm
111138

112139
Aether uses an advanced ImageMagick-based extraction system that:

shaders/amber.glsl

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// AMBER - Warm amber/orange tint for night reading
2+
// Use with: hyprshade on amber
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Convert to grayscale first
16+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
17+
18+
// Apply amber tone
19+
vec3 amber;
20+
amber.r = gray * 1.3;
21+
amber.g = gray * 0.9;
22+
amber.b = gray * 0.5;
23+
24+
// Mix with original for subtle effect
25+
color.rgb = mix(color.rgb, amber, 0.6);
26+
27+
// Clamp to valid range
28+
color.rgb = clamp(color.rgb, 0.0, 1.0);
29+
30+
fragColor = color;
31+
}

shaders/arctic-blue.glsl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// ARCTIC BLUE - Cold arctic blue/ice tint
2+
// Use with: hyprshade on arctic-blue
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Cold blue tint
16+
color.r *= 0.85;
17+
color.g *= 0.95;
18+
color.b *= 1.25;
19+
20+
// Increase saturation for icy look
21+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
22+
color.rgb = mix(vec3(gray), color.rgb, 1.2);
23+
24+
// Increase contrast for crisp look
25+
color.rgb = (color.rgb - 0.5) * 1.2 + 0.5;
26+
27+
// Brighten slightly
28+
color.rgb *= 1.05;
29+
30+
// Clamp to valid range
31+
color.rgb = clamp(color.rgb, 0.0, 1.0);
32+
33+
fragColor = color;
34+
}

shaders/autumn-leaves.glsl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// AUTUMN LEAVES - Warm fall colors with reds and yellows
2+
// Use with: hyprshade on autumn-leaves
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Boost reds and yellows
16+
color.r *= 1.20;
17+
color.g *= 1.05;
18+
color.b *= 0.75;
19+
20+
// Moderate saturation
21+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
22+
color.rgb = mix(vec3(gray), color.rgb, 1.1);
23+
24+
// Reduce contrast for soft autumn feel
25+
color.rgb = (color.rgb - 0.5) * 0.9 + 0.5;
26+
27+
// Add warmth overlay
28+
vec3 autumnTint = vec3(0.9, 0.6, 0.3);
29+
color.rgb = mix(color.rgb, autumnTint, 0.15);
30+
31+
// Clamp to valid range
32+
color.rgb = clamp(color.rgb, 0.0, 1.0);
33+
34+
fragColor = color;
35+
}

shaders/blood-orange.glsl

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// BLOOD ORANGE - Deep orange and red dramatic look
2+
// Use with: hyprshade on blood-orange
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Convert to grayscale first for base
16+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
17+
18+
// Map to blood orange gradient
19+
vec3 darkColor = vec3(0.4, 0.05, 0.0); // Deep red
20+
vec3 midColor = vec3(0.9, 0.3, 0.0); // Orange
21+
vec3 lightColor = vec3(1.0, 0.6, 0.2); // Light orange
22+
23+
vec3 bloodOrange;
24+
if (gray < 0.5) {
25+
bloodOrange = mix(darkColor, midColor, gray * 2.0);
26+
} else {
27+
bloodOrange = mix(midColor, lightColor, (gray - 0.5) * 2.0);
28+
}
29+
30+
// Mix with original for subtle effect
31+
color.rgb = mix(color.rgb, bloodOrange, 0.7);
32+
33+
// Increase contrast
34+
color.rgb = (color.rgb - 0.5) * 1.3 + 0.5;
35+
36+
// Clamp to valid range
37+
color.rgb = clamp(color.rgb, 0.0, 1.0);
38+
39+
fragColor = color;
40+
}

shaders/blue-light-reduce.glsl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// BLUE LIGHT REDUCE - Reduce blue light for eye comfort
2+
// Use with: hyprshade on blue-light-reduce
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Reduce blue light significantly
16+
color.r *= 1.0;
17+
color.g *= 0.95;
18+
color.b *= 0.75;
19+
20+
// Add slight warmth
21+
color.r = min(color.r * 1.05, 1.0);
22+
23+
// Clamp to valid range
24+
color.rgb = clamp(color.rgb, 0.0, 1.0);
25+
26+
fragColor = color;
27+
}

shaders/brightness-boost.glsl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// BRIGHTNESS BOOST - Increase overall brightness
2+
// Use with: hyprshade on brightness-boost
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Increase brightness by 30%
16+
color.rgb *= 1.3;
17+
18+
// Clamp to valid range
19+
color.rgb = clamp(color.rgb, 0.0, 1.0);
20+
21+
fragColor = color;
22+
}

shaders/cel-shade.glsl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// CEL SHADE - Cel shading / toon effect
2+
// Use with: hyprshade on cel-shade
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Quantize to cel shading levels
16+
float levels = 4.0;
17+
color.rgb = floor(color.rgb * levels) / levels;
18+
19+
// Boost saturation
20+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
21+
color.rgb = mix(vec3(gray), color.rgb, 1.4);
22+
23+
// Increase contrast
24+
color.rgb = pow(color.rgb, vec3(0.85));
25+
26+
fragColor = color;
27+
}

shaders/cherry-blossom.glsl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// CHERRY BLOSSOM - Soft pink spring aesthetic
2+
// Use with: hyprshade on cherry-blossom
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
vec4 color = texture(tex, v_texcoord);
14+
15+
// Soft pink tint
16+
vec3 pinkTint = vec3(1.0, 0.8, 0.9);
17+
color.rgb = mix(color.rgb, pinkTint, 0.25);
18+
19+
// Boost reds and reduce blues
20+
color.r *= 1.15;
21+
color.g *= 1.05;
22+
color.b *= 0.95;
23+
24+
// Reduce saturation for soft look
25+
float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
26+
color.rgb = mix(vec3(gray), color.rgb, 0.8);
27+
28+
// Reduce contrast for dreamy feel
29+
color.rgb = (color.rgb - 0.5) * 0.85 + 0.5;
30+
31+
// Lighten overall
32+
color.rgb = color.rgb * 0.85 + vec3(0.15);
33+
34+
// Clamp to valid range
35+
color.rgb = clamp(color.rgb, 0.0, 1.0);
36+
37+
fragColor = color;
38+
}

shaders/chromatic-shift.glsl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// CHROMATIC SHIFT - RGB channel separation
2+
// Use with: hyprshade on chromatic-shift
3+
4+
#version 300 es
5+
precision highp float;
6+
7+
in vec2 v_texcoord;
8+
uniform sampler2D tex;
9+
uniform float time;
10+
out vec4 fragColor;
11+
12+
void main() {
13+
float offset = 0.005;
14+
15+
vec4 color;
16+
color.r = texture(tex, v_texcoord + vec2(offset, 0.0)).r;
17+
color.g = texture(tex, v_texcoord).g;
18+
color.b = texture(tex, v_texcoord - vec2(offset, 0.0)).b;
19+
color.a = 1.0;
20+
21+
fragColor = color;
22+
}

0 commit comments

Comments
 (0)