1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
use crateShaderAsset;
/// **Foil** — Balatro-style metallic shimmer.
///
/// A diagonal sweeping highlight with subtle secondary shimmer for a metallic feel.
///
/// | Uniform | Type | Default | Description |
/// |---------------|---------|---------|---------------------------|
/// | `u_time` | `float` | — | Animation time in seconds |
/// | `u_speed` | `float` | `1.0` | Sweep speed multiplier |
/// | `u_intensity` | `float` | `0.3` | Highlight strength |
pub const FOIL: ShaderAsset = Source ;
/// **Holographic** — Rainbow diffraction shift.
///
/// Simulates light diffraction with angle-dependent hue shifting and wave interference.
///
/// | Uniform | Type | Default | Description |
/// |----------------|---------|---------|----------------------------|
/// | `u_time` | `float` | — | Animation time in seconds |
/// | `u_speed` | `float` | `1.0` | Animation speed multiplier |
/// | `u_saturation` | `float` | `0.7` | Rainbow color saturation |
pub const HOLOGRAPHIC: ShaderAsset = Source ;
/// **Dissolve** — Noise-based transparency with expanding regions.
///
/// Uses voronoi noise to create organic dissolve regions that expand
/// from certain areas based on a threshold. Includes a configurable glowing edge.
///
/// | Uniform | Type | Default | Description |
/// |----------------|---------|---------|-------------------------------------------------------|
/// | `u_threshold` | `float` | — | Dissolve progress: `0.0` = visible, `1.0` = dissolved |
/// | `u_edge_color` | `vec4` | — | Color of the dissolve edge glow |
/// | `u_edge_width` | `float` | `0.05` | Width of the glowing edge |
/// | `u_seed` | `float` | `0.0` | Noise seed for different patterns |
pub const DISSOLVE: ShaderAsset = Source ;
/// **Glow** — Outer glow / bloom effect.
///
/// Samples neighboring pixels to create a glow around opaque regions.
///
/// | Uniform | Type | Default | Description |
/// |--------------------|---------|---------|------------------------------------------|
/// | `u_glow_color` | `vec4` | — | Glow color (e.g. `[0.0, 0.5, 1.0, 1.0]`) |
/// | `u_glow_radius` | `float` | `0.05` | Glow spread in normalized coords |
/// | `u_glow_intensity` | `float` | `1.0` | Glow brightness multiplier |
pub const GLOW: ShaderAsset = Source ;
/// **CRT** — Retro CRT scanline effect.
///
/// Simulates CRT display with scanlines, subtle flicker, and chromatic aberration.
///
/// | Uniform | Type | Default | Description |
/// |----------------|---------|---------|---------------------------------|
/// | `u_line_count` | `float` | `100.0` | Number of scanlines |
/// | `u_intensity` | `float` | `0.3` | Scanline darkness (`0.0`–`1.0`) |
/// | `u_time` | `float` | — | Animation time for flicker |
pub const CRT: ShaderAsset = Source ;
/// **Gradient (Linear)** — Angle-based linear gradient.
///
/// Blends between two colors along a direction defined by an angle.
///
/// | Uniform | Type | Default | Description |
/// |-------------|---------|---------|--------------------------------------------------------------|
/// | `u_color_a` | `vec4` | — | Start color |
/// | `u_color_b` | `vec4` | — | End color |
/// | `u_angle` | `float` | `0.0` | Angle in radians (`0.0` = left→right, `1.5708` = top→bottom) |
pub const GRADIENT_LINEAR: ShaderAsset = Source ;
/// **Gradient (Radial)** — Circle-based radial gradient.
///
/// Blends from an inner color at the center to an outer color at the edge.
///
/// | Uniform | Type | Default | Description |
/// |-------------|---------|--------------|----------------------------------|
/// | `u_color_a` | `vec4` | — | Inner color (at center) |
/// | `u_color_b` | `vec4` | — | Outer color (at edge) |
/// | `u_center` | `vec2` | `[0.5, 0.5]` | Center point (normalized `0..1`) |
/// | `u_radius` | `float` | `0.5` | Radius (normalized) |
pub const GRADIENT_RADIAL: ShaderAsset = Source ;
/// **Gradient (Conic)** — Sweep-around circular gradient.
///
/// Colors sweep around a center point. Resets back to the start color after a
/// full rotation. Use `u_hardness` to control blend smoothness.
///
/// | Uniform | Type | Default | Description |
/// |--------------|---------|--------------|------------------------------------------------------|
/// | `u_color_a` | `vec4` | — | Start color |
/// | `u_color_b` | `vec4` | — | End color (sweeps around to start) |
/// | `u_center` | `vec2` | `[0.5, 0.5]` | Center point (normalized `0..1`) |
/// | `u_offset` | `float` | `0.0` | Rotation offset in radians |
/// | `u_hardness` | `float` | `0.0` | `0.0` = smooth blend, `1.0` = hard reset at boundary |
pub const GRADIENT_CONIC: ShaderAsset = Source ;