gl-transitions 2.0.0 → 2.1.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 (101) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/compatibility.json +290 -0
  3. package/gl-transitions.js +1 -1
  4. package/gl-transitions.json +1 -1
  5. package/glsl3/ApertureWipe.glsl +45 -0
  6. package/glsl3/Comb.glsl +26 -0
  7. package/glsl3/Curtains.glsl +47 -0
  8. package/glsl3/DiamondWipe.glsl +21 -0
  9. package/glsl3/DitherDissolve.glsl +27 -0
  10. package/glsl3/FallOver.glsl +36 -0
  11. package/glsl3/Fisheye.glsl +23 -0
  12. package/glsl3/Halftone.glsl +49 -0
  13. package/glsl3/Honeycomb.glsl +55 -0
  14. package/glsl3/PaperTear.glsl +76 -0
  15. package/glsl3/Prisms.glsl +81 -0
  16. package/glsl3/Puzzle.glsl +124 -0
  17. package/glsl3/Shred.glsl +67 -0
  18. package/glsl3/SpiralWipe.glsl +41 -0
  19. package/glsl3/Tunnel.glsl +42 -0
  20. package/glsl3/TvRoll.glsl +43 -0
  21. package/glsl3/TvTurnOff.glsl +47 -0
  22. package/glsl3/WhipPan.glsl +50 -0
  23. package/index.js +1 -1
  24. package/layouts.json +528 -0
  25. package/llms-full.txt +520 -256
  26. package/llms.txt +154 -136
  27. package/msl/ApertureWipe.metal +193 -0
  28. package/msl/Comb.metal +167 -0
  29. package/msl/Curtains.metal +207 -0
  30. package/msl/DiamondWipe.metal +123 -0
  31. package/msl/DitherDissolve.metal +157 -0
  32. package/msl/FallOver.metal +192 -0
  33. package/msl/Fisheye.metal +121 -0
  34. package/msl/Halftone.metal +230 -0
  35. package/msl/Honeycomb.metal +263 -0
  36. package/msl/PaperTear.metal +373 -0
  37. package/msl/Prisms.metal +424 -0
  38. package/msl/Puzzle.metal +632 -0
  39. package/msl/Shred.metal +294 -0
  40. package/msl/SpiralWipe.metal +196 -0
  41. package/msl/Tunnel.metal +207 -0
  42. package/msl/TvRoll.metal +205 -0
  43. package/msl/TvTurnOff.metal +238 -0
  44. package/msl/WhipPan.metal +218 -0
  45. package/package.json +1 -1
  46. package/skills/gl-transitions/references/catalog.md +52 -34
  47. package/sksl/ApertureWipe.sksl +56 -0
  48. package/sksl/Comb.sksl +39 -0
  49. package/sksl/Curtains.sksl +60 -0
  50. package/sksl/DiamondWipe.sksl +34 -0
  51. package/sksl/DitherDissolve.sksl +39 -0
  52. package/sksl/FallOver.sksl +49 -0
  53. package/sksl/Fisheye.sksl +36 -0
  54. package/sksl/Halftone.sksl +61 -0
  55. package/sksl/Honeycomb.sksl +64 -0
  56. package/sksl/PaperTear.sksl +82 -0
  57. package/sksl/Prisms.sksl +94 -0
  58. package/sksl/Puzzle.sksl +134 -0
  59. package/sksl/Shred.sksl +79 -0
  60. package/sksl/SpiralWipe.sksl +51 -0
  61. package/sksl/Tunnel.sksl +55 -0
  62. package/sksl/TvRoll.sksl +55 -0
  63. package/sksl/TvTurnOff.sksl +59 -0
  64. package/sksl/WhipPan.sksl +62 -0
  65. package/sksl/index.js +1 -1
  66. package/transitions/ApertureWipe.glsl +44 -0
  67. package/transitions/Comb.glsl +25 -0
  68. package/transitions/Curtains.glsl +46 -0
  69. package/transitions/DiamondWipe.glsl +20 -0
  70. package/transitions/DitherDissolve.glsl +26 -0
  71. package/transitions/FallOver.glsl +35 -0
  72. package/transitions/Fisheye.glsl +22 -0
  73. package/transitions/Halftone.glsl +48 -0
  74. package/transitions/Honeycomb.glsl +54 -0
  75. package/transitions/PaperTear.glsl +75 -0
  76. package/transitions/Prisms.glsl +80 -0
  77. package/transitions/Puzzle.glsl +123 -0
  78. package/transitions/Shred.glsl +66 -0
  79. package/transitions/SpiralWipe.glsl +40 -0
  80. package/transitions/Tunnel.glsl +41 -0
  81. package/transitions/TvRoll.glsl +42 -0
  82. package/transitions/TvTurnOff.glsl +46 -0
  83. package/transitions/WhipPan.glsl +49 -0
  84. package/wgsl/ApertureWipe.wgsl +160 -0
  85. package/wgsl/Comb.wgsl +139 -0
  86. package/wgsl/Curtains.wgsl +179 -0
  87. package/wgsl/DiamondWipe.wgsl +94 -0
  88. package/wgsl/DitherDissolve.wgsl +123 -0
  89. package/wgsl/FallOver.wgsl +164 -0
  90. package/wgsl/Fisheye.wgsl +93 -0
  91. package/wgsl/Halftone.wgsl +196 -0
  92. package/wgsl/Honeycomb.wgsl +222 -0
  93. package/wgsl/PaperTear.wgsl +324 -0
  94. package/wgsl/Prisms.wgsl +385 -0
  95. package/wgsl/Puzzle.wgsl +587 -0
  96. package/wgsl/Shred.wgsl +259 -0
  97. package/wgsl/SpiralWipe.wgsl +165 -0
  98. package/wgsl/Tunnel.wgsl +177 -0
  99. package/wgsl/TvRoll.wgsl +165 -0
  100. package/wgsl/TvTurnOff.wgsl +196 -0
  101. package/wgsl/WhipPan.wgsl +177 -0
@@ -1,59 +1,67 @@
1
- # Catalog (gl-transitions@2.0.0)
1
+ # Catalog (gl-transitions@2.1.0)
2
2
 
3
- 125 transitions. Generated from gl-transitions.json; full details (parameter hints, authors, source links) in https://cdn.jsdelivr.net/npm/gl-transitions@2.0.0/llms-full.txt.
3
+ 143 transitions. Generated from gl-transitions.json; full details (parameter hints, authors, source links) in https://cdn.jsdelivr.net/npm/gl-transitions@2.1.0/llms-full.txt.
4
4
 
5
5
  ## By tag
6
6
 
7
- - **wipe**: BowTie, BowTieHorizontal, BowTieVertical, CircleOpen, ClockWipe, DirectionalWarp, DirectionalWipe, FlowerWipe, HeartWipe, HorizontalClose, HorizontalOpen, LeafWipe, LumaWipe, RadialWipe, SquaresWipe, StarWipe, StaticWipe, TilesWave, UndulatingBurnOut, VerticalClose, VerticalOpen, Wind, WindowSlices, WipeDown, WipeLeft, WipeRight, WipeUp, ZoomWipeLeft, ZoomWipeRight
8
- - **blend**: ColorCoords, ColorDistance, CrossZoom, DefocusBlur, DisplacementMap, Dreamy, Fade, GlitchBands, GlitchMemories, Hexagonalize, Kaleidoscope, LinearBlur, Morph, MosaicBlend, MosaicFade, MultiplyBlend, Pixelize, Ripple, RotateFade, SlideAwayRight, Swirl, WaterDrop, WindowBlinds
9
- - **zoom**: Box, CrossWarp, CrossZoom, DirectionalScaled, DreamyZoom, LeftRight, Mosaic, RectangleIris, Revolve, RotateScaleFade, RotateScaleVanish, ScaleIn, SimpleZoom, SimpleZoomOut, StereoViewer, TopBottom, ZoomInCircles, ZoomInOut, ZoomWipeLeft, ZoomWipeRight
10
- - **slide**: Bounce, Directional, DirectionalEased, DirectionalScaled, Fold, LeftRight, SlideAwayRight, Slides, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, TangentMotionBlur, TopBottom
7
+ - **wipe**: ApertureWipe, BowTie, BowTieHorizontal, BowTieVertical, CircleOpen, ClockWipe, DiamondWipe, DirectionalWarp, DirectionalWipe, FlowerWipe, HeartWipe, HorizontalClose, HorizontalOpen, LeafWipe, LumaWipe, RadialWipe, SpiralWipe, SquaresWipe, StarWipe, StaticWipe, TilesWave, UndulatingBurnOut, VerticalClose, VerticalOpen, Wind, WindowSlices, WipeDown, WipeLeft, WipeRight, WipeUp, ZoomWipeLeft, ZoomWipeRight
8
+ - **blend**: ColorCoords, ColorDistance, CrossZoom, DefocusBlur, DisplacementMap, Dreamy, Fade, Fisheye, GlitchBands, GlitchMemories, Hexagonalize, Kaleidoscope, LinearBlur, Morph, MosaicBlend, MosaicFade, MultiplyBlend, Pixelize, Ripple, RotateFade, SlideAwayRight, Swirl, WaterDrop, WindowBlinds
9
+ - **zoom**: Box, CrossWarp, CrossZoom, DirectionalScaled, DreamyZoom, Fisheye, LeftRight, Mosaic, RectangleIris, Revolve, RotateScaleFade, RotateScaleVanish, ScaleIn, SimpleZoom, SimpleZoomOut, StereoViewer, TopBottom, Tunnel, ZoomInCircles, ZoomInOut, ZoomWipeLeft, ZoomWipeRight
10
+ - **slide**: Bounce, Comb, Directional, DirectionalEased, DirectionalScaled, Fold, LeftRight, SlideAwayRight, Slides, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, TangentMotionBlur, TopBottom, WhipPan
11
+ - **horizontal**: BowTieHorizontal, Comb, CrossWarp, Curtains, Fold, LeftRight, PaperTear, SimpleFlip, SlideAwayRight, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideOutHorizontal, Wind, WipeLeft, WipeRight, ZoomWipeLeft, ZoomWipeRight
12
+ - **rotate**: ApertureWipe, Cube, DreamyZoom, FallOver, Honeycomb, Pinwheel, Prisms, Puzzle, Revolve, Rolls, RotateFade, RotateScaleFade, RotateScaleVanish, Swirl, TangentMotionBlur
11
13
  - **fade**: ColorPhase, ColorWrap, EdgeGlow, Fade, FadeColor, FadeGrayscale, FlashFade, HsvFade, MultiplyBlend, Overexposure, RotateScaleFade, ScaleIn, SimpleZoom, SimpleZoomOut
12
- - **horizontal**: BowTieHorizontal, CrossWarp, Fold, LeftRight, SimpleFlip, SlideAwayRight, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideOutHorizontal, Wind, WipeLeft, WipeRight, ZoomWipeLeft, ZoomWipeRight
14
+ - **vertical**: Bounce, BowTieVertical, FallOver, Shred, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutVertical, Squeeze, StaticWipe, TopBottom, TvRoll, TvTurnOff, WipeDown, WipeUp
15
+ - **shape**: ApertureWipe, BowTie, BowTieHorizontal, BowTieVertical, Box, CircleIris, DiamondWipe, FlowerWipe, HeartWipe, LeafWipe, RectangleCover, SpiralWipe, StarWipe
16
+ - **split**: Curtains, HorizontalClose, HorizontalOpen, PaperTear, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, VerticalClose, VerticalOpen
13
17
  - **noise**: BlockDissolve, BurnThrough, Crosshatch, LuminanceMelt, NoiseDissolve, PerlinDissolve, StaticFade, StaticWipe, TvStatic, Wind
14
- - **rotate**: Cube, DreamyZoom, Pinwheel, Revolve, Rolls, RotateFade, RotateScaleFade, RotateScaleVanish, Swirl, TangentMotionBlur
15
- - **shape**: BowTie, BowTieHorizontal, BowTieVertical, Box, CircleIris, FlowerWipe, HeartWipe, LeafWipe, RectangleCover, StarWipe
16
- - **split**: HorizontalClose, HorizontalOpen, SplitSlideInHorizontal, SplitSlideInOutHorizontal, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutHorizontal, SplitSlideOutVertical, VerticalClose, VerticalOpen
17
- - **vertical**: Bounce, BowTieVertical, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutVertical, Squeeze, StaticWipe, TopBottom, WipeDown, WipeUp
18
- - **distort**: ButterflyWaveScrawler, ColorCoords, CrazyParametricFun, DisplacementMap, FlyEye, Kaleidoscope, Morph, PowerKaleido
18
+ - **retro**: DitherDissolve, DoomMelt, Halftone, LissajousTiles, StaticFade, StereoViewer, TvLostSignal, TvRoll, TvStatic, TvTurnOff
19
+ - **3d**: BookFlip, Cube, Curtains, Doorway, FallOver, InvertedPageCurl, Prisms, Swap, Tunnel
20
+ - **distort**: ButterflyWaveScrawler, ColorCoords, CrazyParametricFun, DisplacementMap, Fisheye, FlyEye, Kaleidoscope, Morph, PowerKaleido
21
+ - **directional**: Directional, DirectionalEased, DirectionalScaled, DirectionalWarp, DirectionalWipe, Slides, SquaresWipe, WhipPan
19
22
  - **color**: ColorDistance, ColorPhase, ColorWrap, FadeColor, FadeGrayscale, FlashFade, HsvFade
20
- - **directional**: Directional, DirectionalEased, DirectionalScaled, DirectionalWarp, DirectionalWipe, Slides, SquaresWipe
21
23
  - **glitch**: ColorWrap, GlitchBands, GlitchDisplace, GlitchFlicker, GlitchMemories, StripDatamoshGlitch, TvLostSignal
22
24
  - **chromatic**: ButterflyWaveScrawler, FlyEye, GlitchFlicker, GlitchMemories, Squeeze, StripDatamoshGlitch
23
- - **retro**: DoomMelt, LissajousTiles, StaticFade, StereoViewer, TvLostSignal, TvStatic
24
- - **3d**: BookFlip, Cube, Doorway, InvertedPageCurl, Swap
25
+ - **dissolve**: BlockDissolve, DitherDissolve, GlowDissolve, NoiseDissolve, PerlinDissolve, RandomSquares
26
+ - **iris**: ApertureWipe, CircleIris, CircleOpen, DiamondWipe, RectangleCover, RectangleIris
27
+ - **radial**: ClockWipe, Honeycomb, Pinwheel, RadialWipe, SpiralWipe, Tunnel
28
+ - **tiles**: GridFlip, Honeycomb, LissajousTiles, Mosaic, Puzzle, TilesWave
25
29
  - **blur**: CrossZoom, DefocusBlur, LinearBlur, Revolve, ZoomInOut
26
- - **dissolve**: BlockDissolve, GlowDissolve, NoiseDissolve, PerlinDissolve, RandomSquares
27
30
  - **grid**: Chessboard, GridFlip, LissajousTiles, RandomSquares, SquaresWipe
31
+ - **pattern**: Chessboard, Crosshatch, DitherDissolve, Halftone, PolkaDotsCurtain
32
+ - **pixelate**: DitherDissolve, Hexagonalize, MosaicBlend, MosaicFade, Pixelize
33
+ - **stripes**: Comb, Prisms, Shred, WindowBlinds, WindowSlices
28
34
  - **burn**: BurnThrough, FilmBurn, GlowDissolve, UndulatingBurnOut
29
35
  - **circle**: CircleIris, CircleOpen, UndulatingBurnOut, ZoomInCircles
30
- - **iris**: CircleIris, CircleOpen, RectangleCover, RectangleIris
31
- - **pixelate**: Hexagonalize, MosaicBlend, MosaicFade, Pixelize
32
- - **tiles**: GridFlip, LissajousTiles, Mosaic, TilesWave
36
+ - **flash**: DreamyZoom, FlashFade, Overexposure, TvTurnOff
37
+ - **push**: Comb, Directional, DirectionalEased, DirectionalScaled
38
+ - **shadow**: Bounce, PaperTear, Puzzle, Shred
33
39
  - **wave**: ButterflyWaveScrawler, Dreamy, Ripple, TilesWave
34
40
  - **box**: Box, RectangleCover, RectangleIris
35
41
  - **displace**: ColorCoords, DisplacementMap, GlitchDisplace
36
- - **flash**: DreamyZoom, FlashFade, Overexposure
37
42
  - **flip**: BookFlip, GridFlip, SimpleFlip
38
43
  - **mosaic**: Mosaic, MosaicBlend, MosaicFade
39
- - **pattern**: Chessboard, Crosshatch, PolkaDotsCurtain
40
- - **push**: Directional, DirectionalEased, DirectionalScaled
41
- - **radial**: ClockWipe, Pinwheel, RadialWipe
42
44
  - **reflection**: Cube, Doorway, Swap
45
+ - **scanlines**: GlitchFlicker, TvLostSignal, TvRoll
43
46
  - **squares**: Chessboard, RandomSquares, SquaresWipe
44
47
  - **static**: StaticFade, StaticWipe, TvStatic
48
+ - **warp**: CrossWarp, DirectionalWarp, Tunnel
45
49
  - **clock**: ClockWipe, RadialWipe
50
+ - **dots**: Halftone, PolkaDotsCurtain
51
+ - **fold**: Curtains, Fold
52
+ - **fragments**: Puzzle, Shatter
53
+ - **hexagon**: Hexagonalize, Honeycomb
46
54
  - **kaleidoscope**: Kaleidoscope, PowerKaleido
55
+ - **lens**: Fisheye, FlyEye
47
56
  - **luma**: LumaWipe, LuminanceMelt
48
57
  - **melt**: DoomMelt, LuminanceMelt
58
+ - **motion-blur**: TangentMotionBlur, WhipPan
49
59
  - **page**: BookFlip, InvertedPageCurl
50
60
  - **psychedelic**: ColorWrap, CrazyParametricFun
51
61
  - **ripple**: Ripple, WaterDrop
52
- - **scanlines**: GlitchFlicker, TvLostSignal
62
+ - **slices**: Shred, WindowSlices
53
63
  - **spin**: RotateFade, RotateScaleVanish
54
- - **stripes**: WindowBlinds, WindowSlices
55
64
  - **swirl**: Revolve, Swirl
56
- - **warp**: CrossWarp, DirectionalWarp
57
65
  - **blinds**: WindowBlinds
58
66
  - **blocks**: BlockDissolve
59
67
  - **bounce**: Bounce
@@ -63,32 +71,24 @@
63
71
  - **curl**: InvertedPageCurl
64
72
  - **datamosh**: StripDatamoshGlitch
65
73
  - **doors**: Doorway
66
- - **dots**: PolkaDotsCurtain
67
74
  - **edges**: EdgeGlow
68
75
  - **film**: FilmBurn
69
76
  - **fire**: BurnThrough
70
77
  - **flicker**: GlitchFlicker
71
- - **fold**: Fold
72
- - **fragments**: Shatter
73
78
  - **glow**: GlowDissolve
74
79
  - **grayscale**: FadeGrayscale
75
80
  - **heart**: HeartWipe
76
- - **hexagon**: Hexagonalize
77
81
  - **hue**: HsvFade
78
- - **lens**: FlyEye
79
82
  - **light**: Overexposure
80
83
  - **light-leak**: FilmBurn
81
84
  - **lines**: Crosshatch
82
85
  - **mask**: LumaWipe
83
86
  - **morph**: Morph
84
87
  - **motion**: LissajousTiles
85
- - **motion-blur**: TangentMotionBlur
86
88
  - **pinwheel**: Pinwheel
87
89
  - **polar**: FlowerWipe
88
90
  - **roll**: Rolls
89
- - **shadow**: Bounce
90
91
  - **shatter**: Shatter
91
- - **slices**: WindowSlices
92
92
  - **squeeze**: Squeeze
93
93
  - **star**: StarWipe
94
94
  - **swap**: Swap
@@ -98,6 +98,7 @@
98
98
 
99
99
  `name`: description. Parameters as name (type = default). Extra textures are flagged: the host must provide them.
100
100
 
101
+ - `ApertureWipe`: A camera aperture opens its turning blades to reveal the incoming image. Params: blades (int = 6), rotation (float = 60), shadow (float = 0.5)
101
102
  - `BlockDissolve`: The incoming image appears in small random blocks. Params: blocksize (float = 0.02)
102
103
  - `BookFlip`: The outgoing image turns like a book page from right to left, revealing the incoming one
103
104
  - `Bounce`: The outgoing image drops out of the frame with a few bounces, revealing the incoming one. Params: shadow_colour (vec4 = vec4(0, 0, 0, 0.6)), shadow_height (float = 0.075), bounces (float = 3)
@@ -115,18 +116,22 @@
115
116
  - `ColorDistance`: Pixels switch to the incoming image in order of how close their colors are. Params: power (float = 5)
116
117
  - `ColorPhase`: A crossfade in which each color channel changes at a different time. Params: fromStep (vec4 = vec4(0, 0.2, 0.4, 0)), toStep (vec4 = vec4(0.6, 0.8, 1, 1))
117
118
  - `ColorWrap`: Each color channel of the outgoing image is shifted and wraps around into psychedelic bands, while crossfading to the incoming image. Params: r_strength (float = 1), g_strength (float = 1), b_strength (float = 1)
119
+ - `Comb`: The frame is cut into interleaved strips that slide in opposite directions, each pushing the outgoing image out and the incoming one in. Params: strips (int = 10), vertical (bool = false)
118
120
  - `CrazyParametricFun`: The outgoing image is pulled along a parametric curve into a psychedelic swirl. Params: a (float = 4), b (float = 1), amplitude (float = 120), smoothness (float = 0.1)
119
121
  - `CrossWarp`: The outgoing image zooms in while the incoming one zooms out into place, sweeping from right to left
120
122
  - `CrossZoom`: A crossfade through a strong zoom blur. Params: strength (float = 0.4)
121
123
  - `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)
122
124
  - `Cube`: The two images are faces of a rotating 3D cube, with a floor reflection. Params: persp (float = 0.7), unzoom (float = 0.3), reflection (float = 0.4), floating (float = 3)
125
+ - `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)
123
126
  - `DefocusBlur`: A crossfade through an out-of-focus blur. Params: blurSize (float = 0.02)
127
+ - `DiamondWipe`: A soft-edged diamond grows from the center to reveal the incoming image. Params: center (vec2 = vec2(0.5, 0.5)), smoothness (float = 0.03)
124
128
  - `Directional`: The incoming image pushes the outgoing one out in a given direction. Params: direction (vec2 = vec2(0, 1))
125
129
  - `DirectionalEased`: Like Directional, with an eased movement. Params: direction (vec2 = vec2(0, 1))
126
130
  - `DirectionalScaled`: Like Directional, with both images scaled down while they slide. Params: direction (vec2 = vec2(0, 1)), scale (float = 0.7)
127
131
  - `DirectionalWarp`: A diagonal wipe with a warped, smeared edge. Params: smoothness (float = 0.1), direction (vec2 = vec2(-1, 1))
128
132
  - `DirectionalWipe`: A soft-edged diagonal wipe. Params: direction (vec2 = vec2(1, -1)), smoothness (float = 0.5)
129
133
  - `DisplacementMap`: A crossfade in which a displacement map (an extra grayscale texture) warps both images. Params: strength (float = 0.5). Extra textures: displacementMap
134
+ - `DitherDissolve`: The incoming image appears through a regular 8x8 ordered dither pattern, like a retro computer screen. Params: dotSize (float = 0.02)
130
135
  - `DoomMelt`: The outgoing image melts down in uneven columns, like the Doom screen wipe. Params: bars (int = 30), amplitude (float = 2), noise (float = 0.1), frequency (float = 0.5), dripScale (float = 0.5)
131
136
  - `Doorway`: The outgoing image opens like double doors as the incoming one comes forward, with a floor reflection. Params: reflection (float = 0.4), perspective (float = 0.4), depth (float = 3)
132
137
  - `Dreamy`: A crossfade with a gentle wavy distortion
@@ -135,7 +140,9 @@
135
140
  - `Fade`: A linear crossfade between the two images
136
141
  - `FadeColor`: A fade through a solid color, black by default. Params: color (vec4 = vec4(0, 0, 0, 1)), colorPhase (float = 0.4)
137
142
  - `FadeGrayscale`: A crossfade through grayscale. Params: intensity (float = 0.3)
143
+ - `FallOver`: The outgoing image falls over backward, hinged on its bottom edge, revealing the incoming one behind it. Params: perspective (float = 0.8), shading (float = 0.7)
138
144
  - `FilmBurn`: Glowing film-burn light leaks wash over the image and reveal the incoming one. Params: Seed (float = 2.31)
145
+ - `Fisheye`: The outgoing image bulges toward the viewer through a strong fisheye lens, then the incoming one flattens back into place. Params: strength (float = 0.8)
139
146
  - `FlashFade`: A crossfade that brightens toward a color in the middle. Params: color (vec3 = vec3(0.9, 0.4, 0.2))
140
147
  - `FlowerWipe`: A flower shape with several petals grows to reveal the incoming image. Params: segments (int = 5)
141
148
  - `FlyEye`: The image breaks into a fly's-eye grid of lenses with color separation. Params: size (float = 0.04), zoom (float = 50), colorSeparation (float = 0.3)
@@ -146,8 +153,10 @@
146
153
  - `GlitchMemories`: A crossfade with glitchy, color-shifted blocks
147
154
  - `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)
148
155
  - `GridFlip`: The image splits into a grid of tiles that flip one by one to the incoming image. 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)
156
+ - `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))
149
157
  - `HeartWipe`: A heart shape grows from the center to reveal the incoming image
150
158
  - `Hexagonalize`: Both images turn into hexagons, crossfade, then sharpen again. Params: steps (int = 50), horizontalHexagons (float = 20)
159
+ - `Honeycomb`: The image splits into hexagons that spin and shrink away in a wave from the center, uncovering the incoming image. Params: size (float = 6)
151
160
  - `HorizontalClose`: The incoming image closes in from the top and bottom edges toward the middle
152
161
  - `HorizontalOpen`: The incoming image opens from a line in the middle toward the top and bottom edges
153
162
  - `HsvFade`: A crossfade through the HSV color space that cycles through hues
@@ -166,11 +175,14 @@
166
175
  - `MultiplyBlend`: A crossfade through the multiplied blend of both images
167
176
  - `NoiseDissolve`: The incoming image appears pixel by pixel in random noise
168
177
  - `Overexposure`: A crossfade through a washed-out, overexposed white. Params: strength (float = 0.6)
178
+ - `PaperTear`: The outgoing image tears in two along a ragged line, and the halves are pulled apart to reveal the incoming one. Params: roughness (float = 0.12), tilt (float = 0.1), rim (float = 0.012), paper (vec4 = vec4(1, 0.98, 0.94, 1)), shadow (vec4 = vec4(0, 0, 0, 0.35))
169
179
  - `PerlinDissolve`: The incoming image appears through blobs of Perlin noise. Params: scale (float = 4), smoothness (float = 0.01), seed (float = 12.9898)
170
180
  - `Pinwheel`: A spinning pinwheel reveals the incoming image. Params: speed (float = 2)
171
181
  - `Pixelize`: Both images pixelate, crossfade, then sharpen again. Params: squaresMin (ivec2 = ivec2(20, 20)), steps (int = 50)
172
182
  - `PolkaDotsCurtain`: The incoming image appears through growing polka dots. Params: dots (float = 20), center (vec2 = vec2(0, 0))
173
183
  - `PowerKaleido`: The image folds into an animated kaleidoscope before revealing the incoming one. Params: scale (float = 2), z (float = 1.5), speed (float = 5)
184
+ - `Prisms`: The frame is cut into 3D prisms that turn in a cascade, like a rotating billboard, from the outgoing image on one face to the incoming one on the next. Params: slats (int = 8), stagger (float = 0.45), perspective (float = 1), shading (float = 0.6), horizontal (bool = false), backColor (vec4 = vec4(0, 0, 0, 1))
185
+ - `Puzzle`: The image is cut into jigsaw puzzle pieces that lift one after another and fall away, revealing the incoming image. Params: pieces (float = 5), shadow (float = 0.6)
174
186
  - `RadialWipe`: A radial wipe that sweeps around the center like a clock hand. Params: smoothness (float = 1)
175
187
  - `RandomSquares`: The incoming image appears in random squares. Params: size (ivec2 = ivec2(10, 10)), smoothness (float = 0.5)
176
188
  - `RectangleCover`: A rectangle grows from the center to cover the outgoing image, then shrinks to reveal the incoming one. Params: bgcolor (vec4 = vec4(0, 0, 0, 1))
@@ -183,11 +195,13 @@
183
195
  - `RotateScaleVanish`: The outgoing image spins and shrinks away over the incoming one. Params: FadeInSecond (bool = true), ReverseEffect (bool = false), ReverseRotation (bool = false)
184
196
  - `ScaleIn`: The incoming image scales in from the center while fading in
185
197
  - `Shatter`: The outgoing image shatters into fragments that fly away
198
+ - `Shred`: The outgoing image is cut into paper strips that drop away at uneven speeds, tilting as they fall, revealing the incoming image. Params: strips (int = 20), stagger (float = 0.4), tilt (float = 0.1), shadow (float = 0.5)
186
199
  - `SimpleFlip`: The outgoing image flips around the vertical axis into the incoming one
187
200
  - `SimpleZoom`: Zooms into the outgoing image, then fades to the incoming one. Params: zoom_quickness (float = 0.8)
188
201
  - `SimpleZoomOut`: The incoming image zooms out into place while fading in. Params: zoom_quickness (float = 0.8), fade (bool = true)
189
202
  - `SlideAwayRight`: The outgoing image slides to the right, uncovering a crossfade to the incoming one
190
203
  - `Slides`: The outgoing image slides out, or the incoming one slides in, toward an edge, a corner or the center. Params: type (int = 0), In (bool = false)
204
+ - `SpiralWipe`: A spiral arm winds out from the center and widens to reveal the incoming image. Params: turns (float = 3), smoothness (float = 0.05), clockwise (bool = true)
191
205
  - `SplitSlideInHorizontal`: The incoming image slides in as two halves moving horizontally in opposite directions. Params: reverse (bool = false)
192
206
  - `SplitSlideInOutHorizontal`: The halves of both images slide horizontally in opposite directions, out and in at once. Params: reverse (bool = false)
193
207
  - `SplitSlideInOutVertical`: The halves of both images slide vertically in opposite directions, out and in at once. Params: reverse (bool = false)
@@ -206,12 +220,16 @@
206
220
  - `TangentMotionBlur`: The outgoing image is flung away along a curve with motion blur
207
221
  - `TilesWave`: The incoming image is revealed tile by tile in a diagonal wave. Params: tileCount (ivec2 = ivec2(8, 8)), flipX (bool = true), flipY (bool = false)
208
222
  - `TopBottom`: The outgoing image shrinks away upward while the incoming one slides in from the bottom
223
+ - `Tunnel`: The camera flies down a tunnel lined with the outgoing image toward the incoming one, which opens at its far end and grows to fill the frame. Params: speed (float = 6), twist (float = 0.5)
209
224
  - `TvLostSignal`: A crossfade with drifting tracking lines and tearing, like a TV losing its signal
225
+ - `TvRoll`: The outgoing image rolls faster and faster, like an old TV losing its vertical hold, then the roll slows down and locks on the incoming image. Params: rolls (int = 3), barHeight (float = 0.12), barColor (vec4 = vec4(0, 0, 0, 1))
210
226
  - `TvStatic`: Cuts to full-screen TV static, then to the incoming image. Params: offset (float = 0.05)
227
+ - `TvTurnOff`: The outgoing image collapses into a glowing line and a dot, like an old TV turned off, then the incoming image powers on from the dot. Params: color (vec4 = vec4(0, 0, 0, 1)), glow (float = 1)
211
228
  - `UndulatingBurnOut`: A circle with a wavy edge burns out from the center to reveal the incoming image. Params: smoothness (float = 0.03), center (vec2 = vec2(0.5, 0.5)), color (vec4 = vec4(0, 0, 0, 1))
212
229
  - `VerticalClose`: The incoming image closes in from the left and right edges toward the middle
213
230
  - `VerticalOpen`: The incoming image opens from a line in the middle toward the left and right edges
214
231
  - `WaterDrop`: Ripples spread from the center like a drop falling into water, crossfading to the incoming image. Params: amplitude (float = 30), speed (float = 30)
232
+ - `WhipPan`: A fast camera pan that streaks both images with motion blur, the incoming one arriving from the opposite side. Params: direction (vec2 = vec2(-1, 0)), blur (float = 0.4)
215
233
  - `Wind`: A ragged left-to-right wipe, as if the image was blown away by the wind. Params: size (float = 0.2), reversed (bool = false)
216
234
  - `WindowBlinds`: A crossfade through horizontal window blinds
217
235
  - `WindowSlices`: The incoming image appears through vertical slices that widen. Params: count (float = 10), smoothness (float = 0.5)
@@ -0,0 +1,56 @@
1
+ // ApertureWipe — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/ApertureWipe.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: A camera aperture opens its turning blades 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 int blades;
16
+
17
+ uniform float rotation;
18
+
19
+ uniform float shadow;
20
+
21
+ const float AA = 0.006;
22
+
23
+ vec4 transition (vec2 uv) {
24
+
25
+ vec2 q = (uv - 0.5) * vec2(ratio, 1.0) / (0.5 * length(vec2(ratio, 1.0)));
26
+ float n = clamp(float(blades), 3.0, 12.0);
27
+ float sector = 2.0 * 3.141592653589793 / n;
28
+ float turn = radians(rotation) * progress;
29
+
30
+ float r = mix(-AA, 1.0 + AA, progress);
31
+ float dist = -1e3;
32
+ float seam = 0.0;
33
+ for (int i = 0; i < 12; i++) {
34
+ if (float(i) < n) {
35
+ float angle = turn + float(i) * sector;
36
+ float d = dot(q, vec2(cos(angle), sin(angle))) - r;
37
+ float next = dot(q, vec2(cos(angle + sector), sin(angle + sector))) - r;
38
+ dist = max(dist, d);
39
+
40
+ float s = 1.0 - smoothstep(0.0, 0.12, -d);
41
+ seam = max(seam, (1.0 - smoothstep(0.0, AA, d)) * s * s * smoothstep(0.0, AA, next));
42
+ }
43
+ }
44
+
45
+ float rim = 1.0 - smoothstep(0.0, 0.08, dist);
46
+ float shade = shadow * max(rim * rim, seam) * smoothstep(0.0, 0.1, progress);
47
+ vec4 from = getFromColor(uv);
48
+ from.rgb *= 1.0 - shade;
49
+ return mix(from, getToColor(uv), 1.0 - smoothstep(0.0, AA, dist));
50
+ }
51
+
52
+ half4 main(float2 _coord) {
53
+ vec2 _uv = _coord / _resolution;
54
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
55
+ return half4(_c.rgb * _c.a, _c.a);
56
+ }
package/sksl/Comb.sksl ADDED
@@ -0,0 +1,39 @@
1
+ // Comb — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/Comb.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The frame is cut into interleaved strips that slide in opposite directions, each pushing the outgoing image out and the incoming one in
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 int strips;
16
+
17
+ uniform int vertical;
18
+
19
+ vec4 transition (vec2 uv) {
20
+
21
+ float a = (vertical != 0) ? uv.y : uv.x;
22
+ float b = (vertical != 0) ? uv.x : uv.y;
23
+
24
+ float dir = mod(floor(b * float(strips)), 2.0) < 0.5 ? 1.0 : -1.0;
25
+
26
+ float t = mix(progress, progress * progress * (3.0 - 2.0 * progress), 0.6);
27
+ float fa = a - dir * t;
28
+ if (fa >= 0.0 && fa <= 1.0) {
29
+ return getFromColor((vertical != 0) ? vec2(b, fa) : vec2(fa, b));
30
+ }
31
+ float ta = fa + dir;
32
+ return getToColor((vertical != 0) ? vec2(b, ta) : vec2(ta, b));
33
+ }
34
+
35
+ half4 main(float2 _coord) {
36
+ vec2 _uv = _coord / _resolution;
37
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
38
+ return half4(_c.rgb * _c.a, _c.a);
39
+ }
@@ -0,0 +1,60 @@
1
+ // Curtains — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/Curtains.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The outgoing image parts in the middle like stage curtains, gathering into shaded folds as it is pulled to the sides
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 folds;
16
+
17
+ uniform float shading;
18
+
19
+ uniform float bunch;
20
+
21
+ uniform float sway;
22
+
23
+ const float PI = 3.141592653589793;
24
+
25
+ vec4 transition (vec2 uv) {
26
+
27
+ float lag = sway * (1.0 - uv.y);
28
+ float p = progress * (1.0 - lag * (1.0 - progress));
29
+ float open = mix(p, p * p * (3.0 - 2.0 * p), 0.75);
30
+
31
+ float edge = -bunch * open * open;
32
+ float w = mix(0.5, bunch, open);
33
+ float x = min(uv.x, 1.0 - uv.x) - edge;
34
+ if (x >= w) {
35
+
36
+ vec4 to = getToColor(uv);
37
+ float shadow = 0.4 * exp((w - x) * 25.0) * clamp((edge + w) * 20.0, 0.0, 1.0);
38
+ return vec4(to.rgb * (1.0 - shadow * open), to.a);
39
+ }
40
+ float t = x / w;
41
+
42
+ float n = max(1.0, floor(folds * min(ratio, 1.0) + 0.5));
43
+ float a = 2.0 * PI * n * t;
44
+ float f = 1.0 - (1.0 - open) * (1.0 - open) * (1.0 - open);
45
+ float gather = 0.92 * f;
46
+ float s = 0.5 * (t + gather * sin(a) / (2.0 * PI * n));
47
+ vec4 c = getFromColor(vec2(uv.x < 0.5 ? s : 1.0 - s, uv.y));
48
+
49
+ float slope = 3.0 * gather * cos(a) * (uv.x < 0.5 ? 1.0 : -1.0);
50
+ float diffuse = (1.0 + 0.5 * slope) / sqrt(1.25 * (1.0 + slope * slope));
51
+ float crease = 0.5 + 0.5 * sin(a);
52
+ float light = mix(1.0, diffuse * (1.0 - 0.6 * crease * crease), shading * f);
53
+ return vec4(c.rgb * light, c.a);
54
+ }
55
+
56
+ half4 main(float2 _coord) {
57
+ vec2 _uv = _coord / _resolution;
58
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
59
+ return half4(_c.rgb * _c.a, _c.a);
60
+ }
@@ -0,0 +1,34 @@
1
+ // DiamondWipe — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/DiamondWipe.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: A soft-edged diamond grows from the center 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 float smoothness;
18
+
19
+ vec4 transition (vec2 uv) {
20
+
21
+ vec2 d = abs(uv - center) * vec2(ratio, 1.0);
22
+
23
+ vec2 far = max(center, 1.0 - center) * vec2(ratio, 1.0);
24
+ float dist = (d.x + d.y) / (far.x + far.y);
25
+ float s = max(smoothness, 0.001);
26
+ float m = smoothstep(0.0, s, progress * (1.0 + s) - dist);
27
+ return mix(getFromColor(uv), getToColor(uv), m);
28
+ }
29
+
30
+ half4 main(float2 _coord) {
31
+ vec2 _uv = _coord / _resolution;
32
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
33
+ return half4(_c.rgb * _c.a, _c.a);
34
+ }
@@ -0,0 +1,39 @@
1
+ // DitherDissolve — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/DitherDissolve.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The incoming image appears through a regular 8x8 ordered dither pattern, like a retro computer screen
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 dotSize;
16
+
17
+ float bayer(vec2 c) {
18
+ float v = 0.0;
19
+ float scale = 16.0;
20
+ for (int i = 0; i < 3; i++) {
21
+ vec2 bit = mod(floor(c), 2.0);
22
+
23
+ v += scale * (2.0 * abs(bit.x - bit.y) + bit.y);
24
+ c *= 0.5;
25
+ scale *= 0.25;
26
+ }
27
+ return (v + 0.5) / 64.0;
28
+ }
29
+
30
+ vec4 transition(vec2 uv) {
31
+ vec2 cell = floor(uv * vec2(ratio, 1.0) / dotSize);
32
+ return progress < bayer(cell) ? getFromColor(uv) : getToColor(uv);
33
+ }
34
+
35
+ half4 main(float2 _coord) {
36
+ vec2 _uv = _coord / _resolution;
37
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
38
+ return half4(_c.rgb * _c.a, _c.a);
39
+ }
@@ -0,0 +1,49 @@
1
+ // FallOver — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/FallOver.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The outgoing image falls over backward, hinged on its bottom edge, revealing the incoming one behind it
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 perspective;
16
+
17
+ uniform float shading;
18
+
19
+ const float PI = 3.141592653589793;
20
+
21
+ vec4 transition (vec2 uv) {
22
+
23
+ float fall = progress * (0.25 + 0.75 * progress);
24
+ float angle = 0.5 * PI * fall;
25
+ float c = cos(angle), s = sin(angle);
26
+
27
+
28
+ float dist = 1.0 / max(perspective, 0.01);
29
+ vec3 eye = vec3(0.5 * ratio, 0.5 * c, -dist);
30
+ vec3 dir = vec3(uv.x * ratio, uv.y, 0.0) - eye;
31
+
32
+ float den = dir.z * c - dir.y * s;
33
+ if (den > 0.0) {
34
+ float t = (eye.y * s - eye.z * c) / den;
35
+ vec3 hit = eye + t * dir;
36
+ vec2 puv = vec2(hit.x / ratio, hit.y * c + hit.z * s);
37
+ if (t > 0.0 && puv.y > 0.0 && puv.y <= 1.0 && puv.x >= 0.0 && puv.x <= 1.0) {
38
+ vec4 col = getFromColor(puv);
39
+ return vec4(col.rgb * (1.0 - shading * s), col.a);
40
+ }
41
+ }
42
+ return getToColor(uv);
43
+ }
44
+
45
+ half4 main(float2 _coord) {
46
+ vec2 _uv = _coord / _resolution;
47
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
48
+ return half4(_c.rgb * _c.a, _c.a);
49
+ }
@@ -0,0 +1,36 @@
1
+ // Fisheye — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/Fisheye.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The outgoing image bulges toward the viewer through a strong fisheye lens, then the incoming one flattens back into place
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 strength;
16
+
17
+ vec4 transition(vec2 uv) {
18
+
19
+
20
+ float h = smoothstep(0.0, 1.0, 1.0 - abs(2.0 * progress - 1.0));
21
+ float k = 1.0 - pow(max(1.0 - strength, 0.01), h);
22
+
23
+ vec2 aspect = vec2(ratio, 1.0);
24
+ vec2 c = (uv - 0.5) * aspect;
25
+ float r = length(c) / length(0.5 * aspect);
26
+
27
+
28
+ vec2 q = 0.5 + (uv - 0.5) * (1.0 - k + k * r * r);
29
+ return mix(getFromColor(q), getToColor(q), smoothstep(0.38, 0.62, progress));
30
+ }
31
+
32
+ half4 main(float2 _coord) {
33
+ vec2 _uv = _coord / _resolution;
34
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
35
+ return half4(_c.rgb * _c.a, _c.a);
36
+ }
@@ -0,0 +1,61 @@
1
+ // Halftone — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/Halftone.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: The image breaks into printed halftone dots whose size follows its shades, the dots reshape into the incoming image, then merge back into it
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 dots;
16
+
17
+ uniform float angle;
18
+
19
+ uniform vec4 paper;
20
+
21
+ float dotRadius(vec4 c) {
22
+ float shade = 1.0 - dot(c.rgb, vec3(0.299, 0.587, 0.114));
23
+ return mix(0.1, 0.74, sqrt(clamp(shade, 0.0, 1.0))) * c.a;
24
+ }
25
+
26
+ vec4 transition(vec2 uv) {
27
+
28
+ float h = smoothstep(0.0, 0.3, progress) * (1.0 - smoothstep(0.7, 1.0, progress));
29
+ float t = (progress - 0.3) / 0.4;
30
+
31
+ float a = radians(angle);
32
+ mat2 rot = mat2(cos(a), sin(a), -sin(a), cos(a));
33
+ vec2 scale = vec2(ratio, 1.0) * dots / min(ratio, 1.0);
34
+ vec2 g = rot * ((uv - 0.5) * scale);
35
+ vec2 base = floor(g - 0.5) + 0.5;
36
+ vec4 pixel = progress < 0.5 ? getFromColor(uv) : getToColor(uv);
37
+
38
+ float best = 1e3;
39
+ vec4 ink = pixel;
40
+ for (int i = 0; i < 4; i++) {
41
+ vec2 center = base + vec2(mod(float(i), 2.0), floor(float(i) / 2.0));
42
+ vec2 cuv = (center * rot) / scale + 0.5;
43
+ vec4 cf = getFromColor(cuv);
44
+ vec4 ct = getToColor(cuv);
45
+ float m = smoothstep(0.0, 1.0, clamp(2.5 * t - 1.5 * cuv.x, 0.0, 1.0));
46
+
47
+ float r = mix(0.78, mix(dotRadius(cf), dotRadius(ct), m), h);
48
+ float sd = length(g - center) - r;
49
+ if (sd < best) {
50
+ best = sd;
51
+ ink = mix(pixel, mix(cf, ct, m), h);
52
+ }
53
+ }
54
+ return mix(paper, ink, 1.0 - smoothstep(-0.06, 0.06, best));
55
+ }
56
+
57
+ half4 main(float2 _coord) {
58
+ vec2 _uv = _coord / _resolution;
59
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
60
+ return half4(_c.rgb * _c.a, _c.a);
61
+ }