gl-transitions 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/compatibility.json +96 -0
  3. package/gl-transitions.js +1 -1
  4. package/gl-transitions.json +1 -1
  5. package/glsl3/CircleBurst.glsl +77 -0
  6. package/glsl3/CodeRain.glsl +114 -0
  7. package/glsl3/CurtainRise.glsl +71 -0
  8. package/glsl3/GravityLens.glsl +66 -0
  9. package/glsl3/RingSpin.glsl +112 -0
  10. package/glsl3/SpotlightWipe.glsl +63 -0
  11. package/index.js +1 -1
  12. package/layouts.json +231 -0
  13. package/llms-full.txt +521 -422
  14. package/llms.txt +225 -219
  15. package/msl/CircleBurst.metal +351 -0
  16. package/msl/CodeRain.metal +451 -0
  17. package/msl/CurtainRise.metal +263 -0
  18. package/msl/GravityLens.metal +236 -0
  19. package/msl/RingSpin.metal +474 -0
  20. package/msl/SpotlightWipe.metal +217 -0
  21. package/package.json +1 -1
  22. package/skills/gl-transitions/references/catalog.md +31 -19
  23. package/sksl/CircleBurst.sksl +84 -0
  24. package/sksl/CodeRain.sksl +124 -0
  25. package/sksl/CurtainRise.sksl +84 -0
  26. package/sksl/GravityLens.sksl +77 -0
  27. package/sksl/RingSpin.sksl +121 -0
  28. package/sksl/SpotlightWipe.sksl +74 -0
  29. package/sksl/index.js +1 -1
  30. package/transitions/CircleBurst.glsl +76 -0
  31. package/transitions/CodeRain.glsl +113 -0
  32. package/transitions/CurtainRise.glsl +70 -0
  33. package/transitions/GravityLens.glsl +65 -0
  34. package/transitions/RingSpin.glsl +111 -0
  35. package/transitions/SpotlightWipe.glsl +62 -0
  36. package/wgsl/CircleBurst.wgsl +310 -0
  37. package/wgsl/CodeRain.wgsl +415 -0
  38. package/wgsl/CurtainRise.wgsl +235 -0
  39. package/wgsl/GravityLens.wgsl +206 -0
  40. package/wgsl/RingSpin.wgsl +426 -0
  41. package/wgsl/SpotlightWipe.wgsl +186 -0
@@ -0,0 +1,217 @@
1
+ // SpotlightWipe — MSL, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/SpotlightWipe.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The stage lights go down on the outgoing image and a soft oval spotlight searches across it along a curved path, comes to rest and lights the incoming image inside it, then widens until the stage lights come back up on the incoming image
5
+ // Bindings and uniform layout: see the gl-transitions package README
6
+
7
+ // language: metal1.0
8
+ #include <metal_stdlib>
9
+ #include <simd/simd.h>
10
+
11
+ using metal::uint;
12
+
13
+ struct Uniforms {
14
+ float progress;
15
+ float ratio;
16
+ metal::float2 center;
17
+ float size;
18
+ float darkness;
19
+ char _pad5[8];
20
+ metal::float3 warmth;
21
+ };
22
+
23
+ metal::float4 getToColor(
24
+ thread metal::float2& uv,
25
+ metal::sampler _sampler,
26
+ metal::texture2d<float, metal::access::sample> _to
27
+ ) {
28
+ float _e45 = uv[0u];
29
+ float _e47 = uv[1u];
30
+ metal::float4 _e50 = _to.sample(_sampler, metal::float2(_e45, 1.0 - _e47), metal::level(0.0));
31
+ return _e50;
32
+ }
33
+
34
+ metal::float4 getFromColor(
35
+ thread metal::float2& uv_1,
36
+ metal::texture2d<float, metal::access::sample> _from,
37
+ metal::sampler _sampler
38
+ ) {
39
+ float _e45 = uv_1[0u];
40
+ float _e47 = uv_1[1u];
41
+ metal::float4 _e50 = _from.sample(_sampler, metal::float2(_e45, 1.0 - _e47), metal::level(0.0));
42
+ return _e50;
43
+ }
44
+
45
+ metal::float2 path(
46
+ thread float& t,
47
+ thread metal::float2& c
48
+ ) {
49
+ metal::float2 a = {};
50
+ metal::float2 b = {};
51
+ metal::float2 d = {};
52
+ float s = {};
53
+ a = metal::float2(0.08, 0.3);
54
+ b = metal::float2(0.35, 1.15);
55
+ d = metal::float2(1.05, 0.95);
56
+ float _e49 = t;
57
+ s = 1.0 - _e49;
58
+ float _e51 = s;
59
+ float _e52 = s;
60
+ float _e54 = s;
61
+ metal::float2 _e56 = a;
62
+ float _e58 = s;
63
+ float _e60 = s;
64
+ float _e62 = t;
65
+ metal::float2 _e64 = b;
66
+ float _e67 = s;
67
+ float _e69 = t;
68
+ float _e71 = t;
69
+ metal::float2 _e73 = d;
70
+ float _e76 = t;
71
+ float _e77 = t;
72
+ float _e79 = t;
73
+ metal::float2 _e81 = c;
74
+ return (((_e56 * ((_e51 * _e52) * _e54)) + (_e64 * (((3.0 * _e58) * _e60) * _e62))) + (_e73 * (((3.0 * _e67) * _e69) * _e71))) + (_e81 * ((_e76 * _e77) * _e79));
75
+ }
76
+
77
+ metal::float4 transition(
78
+ thread metal::float2& uv_2,
79
+ metal::texture2d<float, metal::access::sample> _from,
80
+ metal::sampler _sampler,
81
+ metal::texture2d<float, metal::access::sample> _to,
82
+ constant Uniforms& uniforms
83
+ ) {
84
+ metal::float2 asp = {};
85
+ float p = {};
86
+ float t_1 = {};
87
+ metal::float2 c_1 = {};
88
+ float param = {};
89
+ metal::float2 param_1 = {};
90
+ metal::float2 far = {};
91
+ float full = {};
92
+ float g = {};
93
+ float radius = {};
94
+ metal::float2 q = {};
95
+ float r = {};
96
+ float core = {};
97
+ float ring = {};
98
+ float spot = {};
99
+ float s_1 = {};
100
+ metal::float3 light = {};
101
+ float lit = {};
102
+ metal::float4 col = {};
103
+ metal::float2 param_2 = {};
104
+ metal::float2 param_3 = {};
105
+ float _e66 = uniforms.ratio;
106
+ asp = metal::float2(_e66, 1.0);
107
+ float _e69 = uniforms.progress;
108
+ p = _e69;
109
+ float _e70 = p;
110
+ t_1 = metal::clamp(_e70 / 0.5, 0.0, 1.0);
111
+ float _e73 = t_1;
112
+ float _e74 = t_1;
113
+ float _e76 = t_1;
114
+ t_1 = (_e73 * _e74) * (3.0 - (2.0 * _e76));
115
+ float _e80 = t_1;
116
+ param = _e80;
117
+ metal::float2 _e82 = uniforms.center;
118
+ param_1 = _e82;
119
+ metal::float2 _e83 = path(param, param_1);
120
+ c_1 = _e83;
121
+ metal::float2 _e85 = uniforms.center;
122
+ metal::float2 _e87 = uniforms.center;
123
+ metal::float2 _e91 = asp;
124
+ far = metal::max(_e85, metal::float2(1.0) - _e87) * _e91;
125
+ float _e94 = far[0u];
126
+ float _e96 = far[1u];
127
+ full = metal::length(metal::float2(_e94, _e96 / 0.72)) / 0.74;
128
+ float _e101 = p;
129
+ g = metal::smoothstep(0.44, 1.0, _e101);
130
+ float _e104 = uniforms.size;
131
+ float _e106 = full;
132
+ float _e107 = g;
133
+ float _e108 = g;
134
+ radius = metal::mix(0.5 * _e104, _e106, _e107 * (0.3 + (0.7 * _e108)));
135
+ metal::float2 _e113 = uv_2;
136
+ metal::float2 _e114 = c_1;
137
+ metal::float2 _e116 = asp;
138
+ q = (_e113 - _e114) * _e116;
139
+ float _e119 = q[0u];
140
+ float _e121 = q[1u];
141
+ float _e125 = radius;
142
+ r = metal::length(metal::float2(_e119, _e121 / 0.72)) / _e125;
143
+ float _e127 = r;
144
+ core = 1.0 - metal::smoothstep(0.72, 1.08, _e127);
145
+ float _e130 = r;
146
+ ring = (_e130 - 0.9) / 0.09;
147
+ float _e133 = core;
148
+ float _e134 = r;
149
+ float _e136 = r;
150
+ float _e140 = r;
151
+ float _e145 = ring;
152
+ float _e147 = ring;
153
+ spot = metal::max(_e133 * (1.0 - ((0.1 * _e134) * _e136)), 0.12 * (1.0 - metal::smoothstep(0.9, 2.4, _e140))) + (0.16 * metal::exp(-(_e145) * _e147));
154
+ float _e153 = uniforms.darkness;
155
+ float _e154 = p;
156
+ float _e157 = p;
157
+ s_1 = (_e153 * metal::smoothstep(0.0, 0.18, _e154)) * (1.0 - metal::smoothstep(0.72, 1.0, _e157));
158
+ float _e161 = s_1;
159
+ float _e163 = s_1;
160
+ float _e164 = spot;
161
+ metal::float3 _e167 = uniforms.warmth;
162
+ light = metal::float3(1.0 - _e161) + (_e167 * (_e163 * _e164));
163
+ float _e171 = p;
164
+ float _e173 = r;
165
+ lit = metal::smoothstep(0.42, 0.58, _e171) * (1.0 - metal::smoothstep(0.74, 1.0, _e173));
166
+ metal::float2 _e177 = uv_2;
167
+ param_2 = _e177;
168
+ metal::float4 _e178 = getFromColor(param_2, _from, _sampler);
169
+ metal::float2 _e179 = uv_2;
170
+ param_3 = _e179;
171
+ metal::float4 _e180 = getToColor(param_3, _sampler, _to);
172
+ float _e181 = lit;
173
+ col = metal::mix(_e178, _e180, metal::float4(_e181));
174
+ metal::float4 _e184 = col;
175
+ metal::float3 _e186 = light;
176
+ metal::float3 _e187 = _e184.xyz * _e186;
177
+ float _e189 = col[3u];
178
+ return metal::float4(_e187.x, _e187.y, _e187.z, _e189);
179
+ }
180
+
181
+ void main_1(
182
+ metal::texture2d<float, metal::access::sample> _from,
183
+ metal::sampler _sampler,
184
+ metal::texture2d<float, metal::access::sample> _to,
185
+ constant Uniforms& uniforms,
186
+ thread metal::float4& _fragColor,
187
+ thread metal::float2& _uv_1
188
+ ) {
189
+ metal::float2 param_4 = {};
190
+ metal::float2 _e44 = _uv_1;
191
+ param_4 = _e44;
192
+ metal::float4 _e45 = transition(param_4, _from, _sampler, _to, uniforms);
193
+ _fragColor = _e45;
194
+ return;
195
+ }
196
+
197
+ struct main_Input {
198
+ metal::float2 _uv [[user(loc0), center_perspective]];
199
+ };
200
+ struct main_Output {
201
+ metal::float4 member [[color(0)]];
202
+ };
203
+ fragment main_Output main_(
204
+ main_Input varyings [[stage_in]]
205
+ , metal::texture2d<float, metal::access::sample> _from [[texture(0)]]
206
+ , metal::sampler _sampler [[sampler(0)]]
207
+ , metal::texture2d<float, metal::access::sample> _to [[texture(1)]]
208
+ , constant Uniforms& uniforms [[buffer(0)]]
209
+ ) {
210
+ metal::float4 _fragColor = {};
211
+ metal::float2 _uv_1 = {};
212
+ const auto _uv = varyings._uv;
213
+ _uv_1 = _uv;
214
+ main_1(_from, _sampler, _to, uniforms, _fragColor, _uv_1);
215
+ metal::float4 _e3 = _fragColor;
216
+ return main_Output { _e3 };
217
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gl-transitions",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "The open collection of GL Transitions",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -1,50 +1,51 @@
1
- # Catalog (gl-transitions@3.1.0)
1
+ # Catalog (gl-transitions@3.2.0)
2
2
 
3
- 208 transitions. Generated from gl-transitions.json; full details (parameter hints, authors, source links) in https://cdn.jsdelivr.net/npm/gl-transitions@3.1.0/llms-full.txt.
3
+ 214 transitions. Generated from gl-transitions.json; full details (parameter hints, authors, source links) in https://cdn.jsdelivr.net/npm/gl-transitions@3.2.0/llms-full.txt.
4
4
 
5
5
  ## By tag
6
6
 
7
7
  - **wipe**: ApertureWipe, ArrowWipe, BandWipe, BowTie, BowTieHorizontal, BrushWipe, CircleOpen, ClockWipe, ColorPanelWipe, CurvedWipe, DiamondWipe, DirectionalWarp, DirectionalWipe, FlameWipe, FlowerWipe, HeartWipe, HorizontalClose, HorizontalOpen, InsetWipe, KeyholeWipe, LeafWipe, LightWipe, LumaWipe, PlasmaDissolve, PlusWipe, RadialWipe, RingsWipe, SawtoothWipe, SnakeBlockWipe, SpiralBlockWipe, SpiralWipe, SquaresWipe, StarWipe, StaticWipe, TilesWave, UndulatingBurnOut, VerticalClose, VerticalOpen, WedgeWipe, Wind, WindowSlices, ZoomWipeLeft, ZoomWipeRight
8
- - **3d**: Accordion, BookFlip, Clothesline, Crumple, Cube, Curtains, CylinderRoll, DominoFall, Doorway, Drape, FallOver, Gallery, GlitterDissolve, GridFlip, InsideCube, InvertedPageCurl, PaperFold, Prisms, PuzzleCube, RibbonTwist, Shatter, SlotReels, Sphere, SplitFlap, Swap, Tumble, Tunnel, WhipTilt
8
+ - **3d**: Accordion, BookFlip, Clothesline, Crumple, Cube, CurtainRise, Curtains, CylinderRoll, DominoFall, Doorway, Drape, FallOver, Gallery, GlitterDissolve, GridFlip, InsideCube, InvertedPageCurl, PaperFold, Prisms, PuzzleCube, RibbonTwist, Shatter, SlotReels, Sphere, SplitFlap, Swap, Tumble, Tunnel, WhipTilt
9
9
  - **slide**: Accordion, BlockSlide, Bounce, CardSwipe, Clothesline, Comb, Directional, DirectionalEased, DirectionalScaled, Fold, Funnel, Gallery, LeftRight, SlideAwayRight, Slides, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, StretchSlide, TangentMotionBlur, TopBottom, WhipPan
10
+ - **rotate**: ApertureWipe, CardSwipe, Cube, DominoFall, DreamyZoom, FallOver, Honeycomb, InsideCube, Pinwheel, Prisms, Puzzle, PuzzleCube, Revolve, RibbonTwist, RingSpin, Rolls, RotateScaleFade, RotateScaleVanish, Snapshot, Swirl, TangentMotionBlur, Tumble, WhipSpin, WhipTilt
10
11
  - **zoom**: BlockSlide, ComicPanels, CrossWarp, CrossZoom, DirectionalScaled, DreamyZoom, Fisheye, LeftRight, Mosaic, PopIn, RectangleIris, Revolve, RotateScaleFade, RotateScaleVanish, SimpleZoom, SimpleZoomOut, StereoViewer, TopBottom, Tunnel, WarpSpeed, ZoomInCircles, ZoomInOut, ZoomWipeLeft, ZoomWipeRight
11
- - **rotate**: ApertureWipe, CardSwipe, Cube, DominoFall, DreamyZoom, FallOver, Honeycomb, InsideCube, Pinwheel, Prisms, Puzzle, PuzzleCube, Revolve, RibbonTwist, Rolls, RotateScaleFade, RotateScaleVanish, Snapshot, Swirl, TangentMotionBlur, Tumble, WhipSpin, WhipTilt
12
12
  - **directional**: ArrowWipe, BlockSlide, CardSwipe, Clothesline, CurvedWipe, Directional, DirectionalEased, DirectionalScaled, DirectionalWarp, DirectionalWipe, Disintegrate, FlameWipe, Gallery, InsideCube, LiquidFill, PixelStretch, SawtoothWipe, Slides, SquaresWipe, StretchSlide, WaveWipe, WhipPan
13
13
  - **blend**: ColorCoords, ColorDistance, CrossZoom, DefocusBlur, DisplacementMap, Dreamy, Fade, FilmDissolve, Fisheye, GlitchBands, GlitchMemories, HeatHaze, Hexagonalize, Kaleidoscope, Morph, MultiplyBlend, Pixelize, Ripple, SlideAwayRight, Swirl, WindowBlinds
14
14
  - **shape**: ApertureWipe, ArrowWipe, BowTie, BowTieHorizontal, CircleIris, DiamondWipe, EyeBlink, FlowerWipe, HeartWipe, InsetWipe, KeyholeWipe, LeafWipe, PlusWipe, RectangleCover, SawtoothWipe, Sphere, SpiralWipe, StarWipe
15
+ - **vertical**: Bounce, CurtainRise, CylinderRoll, Drape, FallOver, FilmStrip, Funnel, Shred, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutVertical, Squeeze, StaticWipe, TopBottom, TvRoll, TvTurnOff, WhipTilt
15
16
  - **horizontal**: BandWipe, BowTieHorizontal, Comb, CrossWarp, Curtains, Fold, LeftRight, PaperTear, SimpleFlip, SlideAwayRight, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideOutHorizontal, Wind, ZoomWipeLeft, ZoomWipeRight
16
- - **vertical**: Bounce, CylinderRoll, Drape, FallOver, FilmStrip, Funnel, Shred, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutVertical, Squeeze, StaticWipe, TopBottom, TvRoll, TvTurnOff, WhipTilt
17
17
  - **fade**: ColorPhase, ColorWrap, EdgeGlow, Fade, FadeColor, FadeGrayscale, FilmDissolve, FlashFade, HsvFade, MultiplyBlend, Overexposure, PhotoDevelop, RotateScaleFade, SimpleZoom, SimpleZoomOut
18
18
  - **retro**: Ascii, DitherDissolve, DoomMelt, FilmStrip, Halftone, LissajousTiles, PhotoDevelop, StaticFade, StereoViewer, TvLostSignal, TvRoll, TvStatic, TvTurnOff, VhsTracking
19
19
  - **grid**: BlockCover, BlockSlide, Chessboard, ComicPanels, GridFlip, LedWall, LissajousTiles, PuzzleCube, RandomSquares, SnakeBlockWipe, SpiralBlockWipe, SplitFlap, SquaresWipe
20
20
  - **noise**: BurnThrough, Crosshatch, HeatHaze, InkBleed, LuminanceMelt, NoiseDissolve, PerlinDissolve, SmokeDissolve, StaticFade, StaticWipe, TvStatic, VhsTracking, Wind
21
+ - **color**: BlockCover, CircleBurst, ColorDistance, ColorPanelWipe, ColorPhase, ColorWrap, DuotoneFade, FadeColor, FadeGrayscale, FlashFade, HsvFade, PhotoDevelop
21
22
  - **dissolve**: BloomDissolve, BokehDissolve, CellDissolve, DitherDissolve, FilmDissolve, GlintDissolve, GlitterDissolve, GlowDissolve, NoiseDissolve, PerlinDissolve, RandomSquares, SketchDissolve
23
+ - **distort**: ButterflyWaveScrawler, ColorCoords, CrazyParametricFun, DisplacementMap, Fisheye, FlyEye, Funnel, GravityLens, HeatHaze, Kaleidoscope, Morph, PowerKaleido
24
+ - **light**: BloomDissolve, BokehDissolve, FilmDissolve, GlintDissolve, LensFlare, LightRays, LightStreaks, LightWipe, LightningFlash, Overexposure, SpotlightWipe, WarpSpeed
22
25
  - **split**: Curtains, HorizontalClose, HorizontalOpen, PaperTear, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, VerticalClose, VerticalOpen
23
- - **color**: BlockCover, ColorDistance, ColorPanelWipe, ColorPhase, ColorWrap, DuotoneFade, FadeColor, FadeGrayscale, FlashFade, HsvFade, PhotoDevelop
24
- - **distort**: ButterflyWaveScrawler, ColorCoords, CrazyParametricFun, DisplacementMap, Fisheye, FlyEye, Funnel, HeatHaze, Kaleidoscope, Morph, PowerKaleido
25
- - **light**: BloomDissolve, BokehDissolve, FilmDissolve, GlintDissolve, LensFlare, LightRays, LightStreaks, LightWipe, LightningFlash, Overexposure, WarpSpeed
26
+ - **motion-blur**: CameraShake, CylinderRoll, FilmStrip, LightStreaks, RingSpin, SlotReels, TangentMotionBlur, WarpSpeed, WhipPan, WhipSpin, WhipTilt
26
27
  - **shadow**: Bounce, Crumple, CurvedWipe, Drape, Funnel, PaperFold, PaperTear, PopIn, Puzzle, Shred, Snapshot
27
- - **motion-blur**: CameraShake, CylinderRoll, FilmStrip, LightStreaks, SlotReels, TangentMotionBlur, WarpSpeed, WhipPan, WhipSpin, WhipTilt
28
28
  - **radial**: ClockWipe, Honeycomb, LightRays, Pinwheel, RadialWipe, RingsWipe, SpiralWipe, Tunnel, WarpSpeed, WedgeWipe
29
+ - **reveal**: CircleBurst, CodeRain, GooeyWipe, KeyholeWipe, LiquidFill, MoireWipe, SplatterWipe, SpotlightWipe, TruchetWipe, WaveWipe
29
30
  - **chromatic**: ButterflyWaveScrawler, CameraShake, CylinderRoll, FlyEye, GlitchFlicker, GlitchMemories, PixelStretch, Squeeze, StripDatamoshGlitch
30
31
  - **glitch**: ColorWrap, GlitchBands, GlitchDisplace, GlitchFlicker, GlitchMemories, Hologram, StripDatamoshGlitch, TvLostSignal, VhsTracking
31
32
  - **glow**: BloomDissolve, GlowDissolve, LedWall, LensFlare, LightRays, LightStreaks, LightWipe, PlasmaDissolve, Refraction
32
33
  - **stripes**: Accordion, BandWipe, Comb, DominoFall, Prisms, Shred, SlotReels, WindowBlinds, WindowSlices
33
34
  - **tiles**: GlitterDissolve, GridFlip, Honeycomb, LissajousTiles, Mosaic, Puzzle, TilesWave, TruchetWipe, Vortex
35
+ - **circle**: CircleBurst, CircleIris, CircleOpen, RingSpin, RingsWipe, UndulatingBurnOut, WaterDrop, ZoomInCircles
36
+ - **iris**: ApertureWipe, CircleIris, CircleOpen, DiamondWipe, KeyholeWipe, RectangleCover, RectangleIris, SpotlightWipe
34
37
  - **pattern**: Ascii, Chessboard, Crosshatch, DitherDissolve, Halftone, MoireWipe, PolkaDotsCurtain, TruchetWipe
35
38
  - **blur**: BokehDissolve, CrossZoom, DefocusBlur, EyeBlink, FrostWipe, Revolve, ZoomInOut
36
39
  - **flip**: BookFlip, GlitterDissolve, GridFlip, RibbonTwist, SimpleFlip, SplitFlap, Tumble
37
- - **iris**: ApertureWipe, CircleIris, CircleOpen, DiamondWipe, KeyholeWipe, RectangleCover, RectangleIris
38
40
  - **organic**: BrushWipe, GooeyWipe, HeatHaze, InkBleed, PlasmaDissolve, SmokeDissolve, SplatterWipe
39
- - **reveal**: GooeyWipe, KeyholeWipe, LiquidFill, MoireWipe, SplatterWipe, TruchetWipe, WaveWipe
40
41
  - **wave**: ButterflyWaveScrawler, Dreamy, LedWall, LiquidFill, Ripple, TilesWave, WaveWipe
41
- - **circle**: CircleIris, CircleOpen, RingsWipe, UndulatingBurnOut, WaterDrop, ZoomInCircles
42
42
  - **flash**: DreamyZoom, FlashFade, LightningFlash, Overexposure, Snapshot, TvTurnOff
43
+ - **fold**: Accordion, CurtainRise, Curtains, Drape, Fold, PaperFold
43
44
  - **burn**: BurnThrough, FilmBurn, FlameWipe, GlowDissolve, UndulatingBurnOut
44
- - **fold**: Accordion, Curtains, Drape, Fold, PaperFold
45
45
  - **scanlines**: GlitchFlicker, Hologram, TvLostSignal, TvRoll, VhsTracking
46
46
  - **blocks**: BlockCover, BlockSlide, SnakeBlockWipe, SpiralBlockWipe
47
47
  - **clock**: ClockWipe, RadialWipe, RingsWipe, WedgeWipe
48
+ - **lens**: BokehDissolve, Fisheye, FlyEye, GravityLens
48
49
  - **perspective**: Clothesline, Gallery, InsideCube, Tumble
49
50
  - **push**: Comb, Directional, DirectionalEased, DirectionalScaled
50
51
  - **reflection**: Cube, Doorway, Gallery, Swap
@@ -54,10 +55,10 @@
54
55
  - **cover**: BlockCover, FrostWipe, SmokeDissolve
55
56
  - **displace**: ColorCoords, DisplacementMap, GlitchDisplace
56
57
  - **dots**: Halftone, LedWall, PolkaDotsCurtain
57
- - **lens**: BokehDissolve, Fisheye, FlyEye
58
58
  - **paper**: Clothesline, Crumple, PaperFold
59
59
  - **pixelate**: DitherDissolve, Hexagonalize, Pixelize
60
60
  - **refraction**: FacetedGlass, Refraction, WaterDrop
61
+ - **rings**: MoireWipe, RingSpin, RingsWipe
61
62
  - **roll**: CylinderRoll, Rolls, Sphere
62
63
  - **spin**: RotateScaleVanish, SlotReels, WhipSpin
63
64
  - **static**: StaticFade, StaticWipe, TvStatic
@@ -65,6 +66,7 @@
65
66
  - **water**: LiquidFill, WaterDrop, WaveWipe
66
67
  - **card**: CardSwipe, Tumble
67
68
  - **cube**: Cube, InsideCube
69
+ - **digital**: Ascii, CodeRain
68
70
  - **distortion**: FacetedGlass, Refraction
69
71
  - **edges**: EdgeGlow, SketchDissolve
70
72
  - **elastic**: PopIn, StretchSlide
@@ -80,19 +82,21 @@
80
82
  - **liquid**: GooeyWipe, LiquidFill
81
83
  - **luma**: LumaWipe, LuminanceMelt
82
84
  - **melt**: DoomMelt, LuminanceMelt
85
+ - **motion-graphics**: CircleBurst, ColorPanelWipe
83
86
  - **page**: BookFlip, InvertedPageCurl
84
87
  - **paint**: BrushWipe, SplatterWipe
85
88
  - **panels**: ColorPanelWipe, ComicPanels
86
89
  - **photo**: PhotoDevelop, Snapshot
87
90
  - **psychedelic**: ColorWrap, CrazyParametricFun
88
- - **rings**: MoireWipe, RingsWipe
89
91
  - **ripple**: Ripple, WaterDrop
90
92
  - **scale**: PopIn, Snapshot
91
93
  - **shatter**: Shatter, Vortex
92
94
  - **slices**: Shred, WindowSlices
95
+ - **space**: GravityLens, WarpSpeed
93
96
  - **sparkle**: GlintDissolve, GlitterDissolve
94
97
  - **spiral**: SpiralBlockWipe, Vortex
95
98
  - **swirl**: Revolve, Swirl
99
+ - **text**: Ascii, CodeRain
96
100
  - **voronoi**: CellDissolve, FacetedGlass
97
101
  - **zigzag**: SawtoothWipe, SnakeBlockWipe
98
102
  - **arrow**: ArrowWipe
@@ -102,19 +106,21 @@
102
106
  - **bloom**: BloomDissolve
103
107
  - **bokeh**: BokehDissolve
104
108
  - **brush**: BrushWipe
109
+ - **burst**: CircleBurst
105
110
  - **camera**: CameraShake
106
111
  - **cards**: StereoViewer
107
112
  - **cells**: CellDissolve
108
113
  - **chevron**: ArrowWipe
109
114
  - **chromatic-aberration**: Refraction
115
+ - **circular**: GravityLens
110
116
  - **columns**: DoomMelt
111
117
  - **comic**: ComicPanels
112
118
  - **cross**: PlusWipe
113
119
  - **crystal**: FrostWipe
114
120
  - **curl**: InvertedPageCurl
115
121
  - **curve**: CurvedWipe
122
+ - **dark**: GravityLens
116
123
  - **datamosh**: StripDatamoshGlitch
117
- - **digital**: Ascii
118
124
  - **doors**: Doorway
119
125
  - **drawing**: SketchDissolve
120
126
  - **duotone**: DuotoneFade
@@ -151,7 +157,6 @@
151
157
  - **morph**: Morph
152
158
  - **mosaic**: Mosaic
153
159
  - **motion**: LissajousTiles
154
- - **motion-graphics**: ColorPanelWipe
155
160
  - **ocean**: WaveWipe
156
161
  - **particles**: Disintegrate
157
162
  - **paths**: TruchetWipe
@@ -163,6 +168,7 @@
163
168
  - **pop**: PopIn
164
169
  - **poster**: DuotoneFade
165
170
  - **print**: DuotoneFade
171
+ - **rain**: CodeRain
166
172
  - **random**: CellDissolve
167
173
  - **rays**: LightRays
168
174
  - **rotation**: Vortex
@@ -174,12 +180,13 @@
174
180
  - **slanted**: ColorPanelWipe
175
181
  - **smear**: PixelStretch
176
182
  - **smoke**: SmokeDissolve
177
- - **space**: WarpSpeed
178
183
  - **sphere**: Sphere
179
184
  - **splash**: SplatterWipe
185
+ - **spotlight**: SpotlightWipe
180
186
  - **squash**: StretchSlide
181
187
  - **squeeze**: Squeeze
182
188
  - **stack**: CardSwipe
189
+ - **stage**: SpotlightWipe
183
190
  - **star**: StarWipe
184
191
  - **streak**: LensFlare
185
192
  - **streaks**: PixelStretch
@@ -189,7 +196,6 @@
189
196
  - **swing**: Clothesline
190
197
  - **swipe**: CardSwipe
191
198
  - **tape**: VhsTracking
192
- - **text**: Ascii
193
199
  - **truchet**: TruchetWipe
194
200
  - **weather**: LightningFlash
195
201
  - **wedge**: WedgeWipe
@@ -220,10 +226,12 @@
220
226
  - `CardSwipe`: The outgoing image is flicked off like the top card of a stack, swinging around a point below it as it flies out, while the incoming card behind it grows to fill the frame. Params: direction (vec2 = vec2(1, 0.25)), rotation (float = 0.5), depth (float = 0.15), backColor (vec4 = vec4(0.06, 0.06, 0.07, 1))
221
227
  - `CellDissolve`: Irregular cells, like cracked mud or soap foam, switch to the incoming image one by one, with an optional bright border glowing along the cracks between them. Params: cells (float = 8), smoothness (float = 0.1), border (float = 0.006), borderColor (vec4 = vec4(1, 0.95, 0.8, 1)), seed (float = 0)
222
228
  - `Chessboard`: A chessboard pattern of squares reveals the incoming image. Params: grid_num (float = 10)
229
+ - `CircleBurst`: Discs of three solid colors burst out of a point one after another, each covering the last, then a hole bursts open from the same point in the last one to reveal the incoming image. Params: center (vec2 = vec2(0.5, 0.5)), color1 (vec4 = vec4(0.99, 0.79, 0.29, 1)), color2 (vec4 = vec4(0.95, 0.38, 0.33, 1)), color3 (vec4 = vec4(0.13, 0.15, 0.3, 1)), stagger (float = 0.3)
223
230
  - `CircleIris`: The outgoing image closes into a circle over a background color, then the incoming one opens from it. Params: center (vec2 = vec2(0.5, 0.5)), backColor (vec4 = vec4(0.1, 0.1, 0.1, 1))
224
231
  - `CircleOpen`: A soft-edged circle opens from the center to reveal the incoming image. Params: smoothness (float = 0.3), opening (bool = true)
225
232
  - `ClockWipe`: A wipe that sweeps around the center from a starting angle. Params: startingAngle (float = 90)
226
233
  - `Clothesline`: The camera pulls back to show the outgoing image as a print hung by two clothespins on a line in front of a wall, the line is pulled sideways and carries it away while the incoming print slides in, both prints swinging and tilting like hanging paper, then the camera moves back in on the incoming print until it fills the frame. Params: direction (float = 1), sway (float = 0.5), size (float = 0.72), background (vec4 = vec4(0.86, 0.84, 0.8, 1)), lineColor (vec4 = vec4(0.42, 0.34, 0.26, 1)), pinColor (vec4 = vec4(0.84, 0.68, 0.47, 1))
234
+ - `CodeRain`: The outgoing image darkens into a grid of flickering code characters tinted by its colors, then glowing streams of characters fall down the columns at their own speeds, each with a bright head and a fading tail, leaving the incoming image behind. Params: cellSize (float = 0.045), trail (float = 0.5), tint (float = 0.5), glow (vec4 = vec4(0.2, 1, 0.4, 1))
227
235
  - `ColorCoords`: A crossfade in which the colors of one image displace the other
228
236
  - `ColorDistance`: Pixels switch to the incoming image in order of how close their colors are. Params: power (float = 5)
229
237
  - `ColorPanelWipe`: Solid color panels, slightly staggered, sweep across and cover the frame, then sweep off the far side and reveal the incoming image. Params: direction (vec2 = vec2(1, 0)), panels (int = 3), color1 (vec4 = vec4(0.98, 0.76, 0.22, 1)), color2 (vec4 = vec4(0.93, 0.33, 0.36, 1)), color3 (vec4 = vec4(0.16, 0.2, 0.42, 1)), stagger (float = 0.35), skew (float = 0.25)
@@ -237,6 +245,7 @@
237
245
  - `Crosshatch`: The incoming image appears through a crosshatch of lines spreading from the center. Params: center (vec2 = vec2(0.5, 0.5)), threshold (float = 3), fadeEdge (float = 0.1)
238
246
  - `Crumple`: The outgoing image crumples into a creased paper ball, shaded along its folds, which is then tossed away to reveal the incoming image. Params: creases (int = 16), size (float = 0.2), direction (vec2 = vec2(1, 0.4)), paper (vec4 = vec4(0.96, 0.95, 0.91, 1)), shadow (vec4 = vec4(0, 0, 0, 0.45))
239
247
  - `Cube`: The two images are faces of a box that turns a quarter turn in perspective, the outgoing face darkening as it turns away, above a reflective floor. Params: persp (float = 0.7), unzoom (float = 0.3), reflection (float = 0.4), floating (float = 3), shading (float = 0.5)
248
+ - `CurtainRise`: The outgoing image rises like a theater festoon curtain: cords lift its hem into scalloped swags while the fabric gathers into shaded ruffles, and it is drawn up out of the frame over the incoming image. Params: swags (float = 3), sag (float = 0.14), ruffles (float = 14), shading (float = 0.7)
240
249
  - `Curtains`: The outgoing image parts in the middle like stage curtains, gathering into shaded folds as it is pulled to the sides. Params: folds (float = 7), shading (float = 0.7), bunch (float = 0.12), sway (float = 0.4)
241
250
  - `CurvedWipe`: The outgoing image is pulled away by its middle: the wipe edge bulges into a smooth curve that leads the way, then flattens as it reaches the far side. Params: direction (vec2 = vec2(0, 1)), curvature (float = 0.6), smoothness (float = 0.02), shadow (vec4 = vec4(0, 0, 0, 0.4))
242
251
  - `CylinderRoll`: The frame wraps around a drum that rolls up, the outgoing image turning away over its top in a motion blur and the incoming one coming around from below and unrolling flat. Params: curvature (float = 0.8), blur (float = 0.5), shading (float = 0.6), chroma (float = 0.5), downward (bool = false)
@@ -284,6 +293,7 @@
284
293
  - `GlitterDissolve`: The image becomes a shimmering field of tiny diamond sequins that flip over in 3D at random moments, each lifting and tilting on its own axis and flashing a glint of light, and land on the incoming image. Params: tiles (float = 20), hexagons (bool = false), sparkle (float = 1), glint (vec3 = vec3(1, 0.97, 0.9)), seed (float = 0), backColor (vec4 = vec4(0.04, 0.04, 0.05, 1))
285
294
  - `GlowDissolve`: The incoming image spreads over the outgoing one with a hot, glowing edge. Params: uLineWidth (float = 0.1), uSpreadClr (vec3 = vec3(1, 0, 0)), uHotClr (vec3 = vec3(0.9, 0.9, 0.2)), uPow (float = 5), uIntensity (float = 1)
286
295
  - `GooeyWipe`: Soft, glossy blobs of liquid pop up over the outgoing image, swell and melt into each other, revealing the incoming image until they cover the whole frame. Params: blobs (float = 5), smoothness (float = 0.5), highlight (vec4 = vec4(1, 1, 1, 0.7)), shadow (vec4 = vec4(0, 0, 0, 0.3))
296
+ - `GravityLens`: A black disk appears and grows, bending the outgoing image around it like a heavy mass bends light: the image is stretched into a bright ring at the disk's edge and swallowed until the frame is black, then the disk shrinks back, unbending the incoming image. Params: center (vec2 = vec2(0.5, 0.5)), strength (float = 0.6), glow (float = 0.6), hole (vec4 = vec4(0, 0, 0, 1))
287
297
  - `GridFlip`: The image splits into a grid of cards that lift apart and turn over in perspective one after another, each one showing its part of the incoming image on its back. Params: size (ivec2 = ivec2(4, 4)), pause (float = 0.1), dividerWidth (float = 0.05), bgcolor (vec4 = vec4(0, 0, 0, 1)), randomness (float = 0.1)
288
298
  - `Halftone`: The image breaks into printed halftone dots whose size follows its shades, the dots reshape into the incoming image, then merge back into it. Params: dots (float = 28), angle (float = 45), paper (vec4 = vec4(1, 1, 1, 1))
289
299
  - `HeartWipe`: A heart grows from the center with a little heartbeat to reveal the incoming image. Params: center (vec2 = vec2(0.5, 0.5)), smoothness (float = 0.006), pulse (float = 0.5), glowColor (vec3 = vec3(1, 0.85, 0.9)), glow (float = 0.3)
@@ -340,6 +350,7 @@
340
350
  - `Refraction`: The frame is seen through flowing liquid glass that bends the outgoing image more and more, with rainbow fringes, flares up as the incoming image takes over, then calms down and clears. Params: strength (float = 0.15), scale (float = 2.5), dispersion (float = 0.5), brightness (float = 1)
341
351
  - `Revolve`: The outgoing image swirls and zooms with motion blur into the incoming one. Params: center (vec2 = vec2(0.46, 0.52)), direction (float = -1), maxRotation (float = 1.95), peakZoom (float = 2.22), swirl (float = 2.85), barrel (float = 0.38), motionBlur (float = 1), switchStart (float = 0.3), switchEnd (float = 0.5), shadow (float = 0.16)
342
352
  - `RibbonTwist`: The image twists like a ribbon around its horizontal center line, the twist travelling smoothly across its width, the outgoing image on its front and the incoming one on its back. Params: spread (float = 0.8), perspective (float = 0.4), shading (float = 0.6), vertical (bool = false), backColor (vec4 = vec4(0, 0, 0, 1))
353
+ - `RingSpin`: The frame is cut into concentric rings that spin like the dials of a combination lock, in alternating directions and blurred with speed, one after another from the center outward; each ring overshoots a little and locks into place on the incoming image. Params: rings (int = 6), square (bool = false), turns (int = 1), stagger (float = 0.5), blur (float = 0.6), settle (float = 0.5)
343
354
  - `RingsWipe`: Concentric rings ripple out from the center and, one after another, each sweeps around like a clock hand in the opposite direction of its neighbors to reveal the incoming image, or fills across its width, with optional colored borders between the rings. Params: count (int = 6), center (vec2 = vec2(0.5, 0.5)), stagger (float = 0.5), radial (bool = false), borderWidth (float = 0.008), borderColor (vec4 = vec4(1, 1, 1, 1)), smoothness (float = 0.004)
344
355
  - `Ripple`: Ripples spread from the center while crossfading. Params: amplitude (float = 100), speed (float = 50)
345
356
  - `Rolls`: The outgoing image rolls away around a corner, revealing the incoming one. Params: type (int = 0), RotDown (bool = false)
@@ -369,6 +380,7 @@
369
380
  - `SplitSlideInVertical`: The incoming image slides in as two halves moving vertically in opposite directions. Params: reverse (bool = false)
370
381
  - `SplitSlideOutHorizontal`: The outgoing image slides out as two halves moving horizontally in opposite directions. Params: reverse (bool = false)
371
382
  - `SplitSlideOutVertical`: The outgoing image slides out as two halves moving vertically in opposite directions. Params: reverse (bool = false)
383
+ - `SpotlightWipe`: The stage lights go down on the outgoing image and a soft oval spotlight searches across it along a curved path, comes to rest and lights the incoming image inside it, then widens until the stage lights come back up on the incoming image. Params: center (vec2 = vec2(0.5, 0.5)), size (float = 0.3), darkness (float = 0.85), warmth (vec3 = vec3(1, 0.93, 0.8))
372
384
  - `SquaresWipe`: Squares grow along a diagonal sweep to reveal the incoming image. Params: squares (ivec2 = ivec2(10, 10)), direction (vec2 = vec2(1, -0.5)), smoothness (float = 1.6)
373
385
  - `Squeeze`: The outgoing image is squeezed into a line with color separation, revealing the incoming one. Params: colorSeparation (float = 0.04)
374
386
  - `StarWipe`: A growing star reveals the incoming image. Params: border_thickness (float = 0.01), star_rotation (float = 0.75), border_color (vec4 = vec4(1, 1, 1, 1)), star_center (vec2 = vec2(0.5, 0.5))
@@ -0,0 +1,84 @@
1
+ // CircleBurst — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/CircleBurst.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: Discs of three solid colors burst out of a point one after another, each covering the last, then a hole bursts open from the same point in the last one to reveal the incoming image
5
+
6
+ uniform shader _from;
7
+ uniform shader _to;
8
+ uniform float2 _resolution;
9
+ uniform float progress;
10
+ uniform float ratio;
11
+
12
+ vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
13
+ vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
14
+
15
+ uniform vec2 center;
16
+
17
+ uniform vec4 color1;
18
+
19
+ uniform vec4 color2;
20
+
21
+ uniform vec4 color3;
22
+
23
+ uniform float stagger;
24
+
25
+ const float AA = 0.0015;
26
+
27
+ const float SW = 0.03;
28
+ const float SO = 0.32;
29
+
30
+ float phase(float s, float d) {
31
+ return clamp((progress - s) / d, 0.0, 1.0);
32
+ }
33
+
34
+ float radius(float t, float R) {
35
+ float u = 1.0 - t;
36
+ return mix(-SW - AA, R, mix(t, 1.0 - u * u * u, 0.8));
37
+ }
38
+
39
+ vec2 mirror(vec2 v) {
40
+ return 1.0 - abs(1.0 - mod(abs(v), 2.0));
41
+ }
42
+
43
+ vec4 layer(vec4 p, vec4 c, float r, float x) {
44
+ float k = smoothstep(r - AA, r + AA, x);
45
+ float s = SO * c.a * k * (1.0 - smoothstep(0.0, SW, x - r));
46
+ p = p * (1.0 - s) + vec4(0.0, 0.0, 0.0, s);
47
+ k = c.a * (1.0 - k);
48
+ return p * (1.0 - k) + vec4(c.rgb, 1.0) * k;
49
+ }
50
+
51
+ vec4 transition(vec2 uv) {
52
+ vec2 asp = vec2(ratio, 1.0);
53
+ float x = length((uv - center) * asp);
54
+
55
+ float R = length(max(center, 1.0 - center) * asp) + SW + AA;
56
+ float k = clamp(stagger, 0.0, 1.0);
57
+ float d = 1.0 / (1.0 + 3.0 * k);
58
+
59
+
60
+ float t = phase(0.0, d);
61
+ vec4 a = getFromColor(mirror(center + (uv - center) / (1.0 + 0.06 * t * (2.0 - t))));
62
+ vec4 p = vec4(a.rgb * a.a, a.a);
63
+ p = layer(p, color1, radius(t, R), x);
64
+ p = layer(p, color2, radius(phase(k * d, d), R), x);
65
+ float r = radius(phase(2.0 * k * d, d), R);
66
+ p = layer(p, color3, r, x);
67
+
68
+
69
+
70
+ t = phase(3.0 * k * d, d);
71
+ float h = radius(t, R);
72
+ float u = 1.0 - t;
73
+ vec4 b = getToColor(mirror(center + (uv - center) / (1.0 + 0.14 * u * u * (1.0 - 2.4 * t))));
74
+ float s = SO * color3.a * clamp((r - h) / SW, 0.0, 1.0) * (1.0 - smoothstep(0.0, SW, h - x));
75
+ vec4 q = vec4(b.rgb * b.a * (1.0 - s), b.a * (1.0 - s) + s);
76
+ p = mix(p, q, 1.0 - smoothstep(h - AA, h + AA, x));
77
+ return p.a > 0.0 ? vec4(p.rgb / p.a, p.a) : vec4(0.0);
78
+ }
79
+
80
+ half4 main(float2 _coord) {
81
+ vec2 _uv = _coord / _resolution;
82
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
83
+ return half4(_c.rgb * _c.a, _c.a);
84
+ }
@@ -0,0 +1,124 @@
1
+ // CodeRain — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/CodeRain.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The outgoing image darkens into a grid of flickering code characters tinted by its colors, then glowing streams of characters fall down the columns at their own speeds, each with a bright head and a fading tail, leaving the incoming image behind
5
+
6
+ uniform shader _from;
7
+ uniform shader _to;
8
+ uniform float2 _resolution;
9
+ uniform float progress;
10
+ uniform float ratio;
11
+
12
+ vec4 getFromColor(vec2 uv) { return vec4(unpremul(_from.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
13
+ vec4 getToColor(vec2 uv) { return vec4(unpremul(_to.eval(vec2(uv.x, 1.0 - uv.y) * _resolution))); }
14
+
15
+ uniform float cellSize;
16
+
17
+ uniform float trail;
18
+
19
+ uniform float tint;
20
+
21
+ uniform vec4 glow;
22
+
23
+ float hash12(vec2 p) {
24
+ vec3 p3 = fract(vec3(p.xyx) * 0.1031);
25
+ p3 += dot(p3, p3.yzx + 33.33);
26
+ return fract((p3.x + p3.y) * p3.z);
27
+ }
28
+
29
+ vec4 hash42(vec2 p) {
30
+ vec4 p4 = fract(vec4(p.xyxy) * vec4(0.1031, 0.1030, 0.0973, 0.1099));
31
+ p4 += dot(p4, p4.wzxy + 33.33);
32
+ return fract((p4.xxyz + p4.yzzw) * p4.zywx);
33
+ }
34
+
35
+ vec4 band(vec4 d) {
36
+ return 1.0 - smoothstep(0.3, 0.6, d);
37
+ }
38
+
39
+ float glyph(vec2 cell, float t, vec2 local) {
40
+ vec2 b = local * vec2(6.0, 8.0) - 0.5;
41
+ float x = b.x;
42
+ float y = b.y;
43
+ float d = 0.667 * y;
44
+
45
+ float x04 = abs(x - 2.0) - 2.0;
46
+ float y06 = abs(y - 3.0) - 3.0;
47
+ float y03 = abs(y - 1.5) - 1.5;
48
+ float y36 = abs(y - 4.5) - 1.5;
49
+ vec2 seed = cell + t * vec2(37.0, 61.0);
50
+
51
+
52
+ vec4 sa = band(abs(vec4(y, y - 3.0, y - 6.0, x - d))) * band(vec4(x04, x04, x04, y06));
53
+ vec4 sb = band(abs(vec4(x, x, x - 4.0, x - 4.0))) * band(vec4(y03, y36, y03, y36));
54
+ vec4 sc = band(abs(vec4(x - 2.0, x - 2.0, x + d - 4.0, y - 1.0))) * band(vec4(y03, y36, y06, abs(x - 2.0) - 1.0));
55
+ float on = dot(step(0.68, hash42(seed)), sa);
56
+ on += dot(step(0.68, hash42(seed + 41.0)), sb);
57
+ on += dot(step(0.68, hash42(seed + 83.0)), sc);
58
+ return min(on, 1.0);
59
+ }
60
+
61
+ vec4 transition(vec2 uv) {
62
+ float h = max(cellSize, 0.005);
63
+ vec2 dims = vec2(0.75 * h, h);
64
+
65
+ vec2 fp = vec2(uv.x * ratio, 1.0 - uv.y);
66
+
67
+ vec2 grid = fp / dims + vec2(0.389, 0.278);
68
+ vec2 cell = floor(grid);
69
+ vec2 local = grid - cell;
70
+ float rc = hash12(cell + vec2(97.0, 131.0));
71
+
72
+
73
+ float r1 = hash12(vec2(cell.x, 11.0));
74
+ float r2 = hash12(vec2(cell.x, 23.0));
75
+ float r3 = hash12(vec2(cell.x, 37.0));
76
+ float T = mix(progress, progress * progress * (3.0 - 2.0 * progress), 0.5);
77
+ float len = max(trail, 0.01) * (0.5 + r3);
78
+ float u = clamp((T - 0.03 - 0.5 * r1) / (0.3 + 0.12 * r2), 0.0, 1.0);
79
+
80
+ float head = mix(-0.2, 1.0 + h + len, u * (0.7 + 0.3 * u));
81
+
82
+ float dy = head - (cell.y - 0.278) * h;
83
+
84
+ vec4 a = getFromColor(uv);
85
+ vec4 b = getToColor(uv);
86
+
87
+
88
+
89
+ vec2 cuv = clamp(vec2((cell.x + 0.111) * dims.x / ratio, 1.0 - (cell.y + 0.222) * h), 0.0, 1.0);
90
+ vec4 ca = getFromColor(cuv);
91
+ float lum = dot(ca.rgb, vec3(0.299, 0.587, 0.114));
92
+ vec3 hue = ca.rgb / max(max(ca.r, max(ca.g, ca.b)), 0.05);
93
+ vec3 ink = mix(glow.rgb * glow.a, hue, tint) * (0.1 + 0.6 * lum);
94
+ float near = smoothstep(-0.15, 0.0, dy);
95
+ float dim = max(smoothstep(0.0, 0.3, T), near);
96
+ float g = max(smoothstep(0.0, 0.2, T - 0.12 * rc), near);
97
+ float passed = step(0.0, dy);
98
+
99
+ float slow = mod(floor(T * 12.0 + rc * 7.0), 32.0);
100
+ float fast = 32.0 + mod(floor(T * 40.0 + rc * 13.0), 32.0);
101
+ float chr = glyph(cell, mix(slow, fast, passed), local);
102
+ vec3 code = a.rgb * (1.0 - 0.8 * dim) + ink * chr * g;
103
+
104
+
105
+
106
+ float fade = clamp(1.0 - dy / len, 0.0, 1.0);
107
+ float shade = 1.0 - smoothstep(0.3 * len, len, dy);
108
+ float hot = 1.0 - smoothstep(h, 3.0 * h, dy);
109
+ vec3 col = mix(glow.rgb * 1.2, vec3(1.0), 0.8 * hot) * glow.a;
110
+ vec3 stream = b.rgb * (1.0 - 0.8 * shade) + col * chr * (fade * (2.0 - fade) + hot * fade);
111
+
112
+
113
+ float yy = (head - fp.y) / (1.5 * h);
114
+ float halo = 1.6 * u * (1.0 - u) * exp(-yy * yy) * (1.0 - smoothstep(0.25, 0.5, abs(local.x - 0.5)));
115
+ vec3 rgb = mix(code, stream, passed) + glow.rgb * glow.a * halo;
116
+
117
+ return vec4(clamp(rgb, 0.0, 1.0), mix(a.a, mix(b.a, a.a, shade), passed));
118
+ }
119
+
120
+ half4 main(float2 _coord) {
121
+ vec2 _uv = _coord / _resolution;
122
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
123
+ return half4(_c.rgb * _c.a, _c.a);
124
+ }