gl-transitions 2.0.0 → 2.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 (131) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/compatibility.json +386 -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/CylinderRoll.glsl +102 -0
  9. package/glsl3/DiamondWipe.glsl +21 -0
  10. package/glsl3/DitherDissolve.glsl +27 -0
  11. package/glsl3/FallOver.glsl +36 -0
  12. package/glsl3/Fisheye.glsl +23 -0
  13. package/glsl3/Halftone.glsl +49 -0
  14. package/glsl3/Honeycomb.glsl +55 -0
  15. package/glsl3/LightStreaks.glsl +117 -0
  16. package/glsl3/PaperTear.glsl +76 -0
  17. package/glsl3/PixelStretch.glsl +73 -0
  18. package/glsl3/Prisms.glsl +81 -0
  19. package/glsl3/Puzzle.glsl +124 -0
  20. package/glsl3/Refraction.glsl +95 -0
  21. package/glsl3/Shred.glsl +67 -0
  22. package/glsl3/SpiralWipe.glsl +41 -0
  23. package/glsl3/Tunnel.glsl +42 -0
  24. package/glsl3/TvRoll.glsl +43 -0
  25. package/glsl3/TvTurnOff.glsl +47 -0
  26. package/glsl3/WhipPan.glsl +50 -0
  27. package/glsl3/WhipSpin.glsl +69 -0
  28. package/glsl3/WhipTilt.glsl +79 -0
  29. package/index.js +1 -1
  30. package/layouts.json +764 -0
  31. package/llms-full.txt +620 -256
  32. package/llms.txt +160 -136
  33. package/msl/ApertureWipe.metal +193 -0
  34. package/msl/Comb.metal +167 -0
  35. package/msl/Curtains.metal +207 -0
  36. package/msl/CylinderRoll.metal +374 -0
  37. package/msl/DiamondWipe.metal +123 -0
  38. package/msl/DitherDissolve.metal +157 -0
  39. package/msl/FallOver.metal +192 -0
  40. package/msl/Fisheye.metal +121 -0
  41. package/msl/Halftone.metal +230 -0
  42. package/msl/Honeycomb.metal +263 -0
  43. package/msl/LightStreaks.metal +518 -0
  44. package/msl/PaperTear.metal +373 -0
  45. package/msl/PixelStretch.metal +337 -0
  46. package/msl/Prisms.metal +424 -0
  47. package/msl/Puzzle.metal +632 -0
  48. package/msl/Refraction.metal +333 -0
  49. package/msl/Shred.metal +294 -0
  50. package/msl/SpiralWipe.metal +196 -0
  51. package/msl/Tunnel.metal +207 -0
  52. package/msl/TvRoll.metal +205 -0
  53. package/msl/TvTurnOff.metal +238 -0
  54. package/msl/WhipPan.metal +218 -0
  55. package/msl/WhipSpin.metal +278 -0
  56. package/msl/WhipTilt.metal +327 -0
  57. package/package.json +1 -1
  58. package/skills/gl-transitions/references/catalog.md +69 -39
  59. package/sksl/ApertureWipe.sksl +56 -0
  60. package/sksl/Comb.sksl +39 -0
  61. package/sksl/Curtains.sksl +60 -0
  62. package/sksl/CylinderRoll.sksl +112 -0
  63. package/sksl/DiamondWipe.sksl +34 -0
  64. package/sksl/DitherDissolve.sksl +39 -0
  65. package/sksl/FallOver.sksl +49 -0
  66. package/sksl/Fisheye.sksl +36 -0
  67. package/sksl/Halftone.sksl +61 -0
  68. package/sksl/Honeycomb.sksl +64 -0
  69. package/sksl/LightStreaks.sksl +126 -0
  70. package/sksl/PaperTear.sksl +82 -0
  71. package/sksl/PixelStretch.sksl +84 -0
  72. package/sksl/Prisms.sksl +94 -0
  73. package/sksl/Puzzle.sksl +134 -0
  74. package/sksl/Refraction.sksl +103 -0
  75. package/sksl/Shred.sksl +79 -0
  76. package/sksl/SpiralWipe.sksl +51 -0
  77. package/sksl/Tunnel.sksl +55 -0
  78. package/sksl/TvRoll.sksl +55 -0
  79. package/sksl/TvTurnOff.sksl +59 -0
  80. package/sksl/WhipPan.sksl +62 -0
  81. package/sksl/WhipSpin.sksl +79 -0
  82. package/sksl/WhipTilt.sksl +90 -0
  83. package/sksl/index.js +1 -1
  84. package/transitions/ApertureWipe.glsl +44 -0
  85. package/transitions/Comb.glsl +25 -0
  86. package/transitions/Curtains.glsl +46 -0
  87. package/transitions/CylinderRoll.glsl +101 -0
  88. package/transitions/DiamondWipe.glsl +20 -0
  89. package/transitions/DitherDissolve.glsl +26 -0
  90. package/transitions/FallOver.glsl +35 -0
  91. package/transitions/Fisheye.glsl +22 -0
  92. package/transitions/Halftone.glsl +48 -0
  93. package/transitions/Honeycomb.glsl +54 -0
  94. package/transitions/LightStreaks.glsl +116 -0
  95. package/transitions/PaperTear.glsl +75 -0
  96. package/transitions/PixelStretch.glsl +72 -0
  97. package/transitions/Prisms.glsl +80 -0
  98. package/transitions/Puzzle.glsl +123 -0
  99. package/transitions/Refraction.glsl +94 -0
  100. package/transitions/Shred.glsl +66 -0
  101. package/transitions/SpiralWipe.glsl +40 -0
  102. package/transitions/Tunnel.glsl +41 -0
  103. package/transitions/TvRoll.glsl +42 -0
  104. package/transitions/TvTurnOff.glsl +46 -0
  105. package/transitions/WhipPan.glsl +49 -0
  106. package/transitions/WhipSpin.glsl +68 -0
  107. package/transitions/WhipTilt.glsl +78 -0
  108. package/wgsl/ApertureWipe.wgsl +160 -0
  109. package/wgsl/Comb.wgsl +139 -0
  110. package/wgsl/Curtains.wgsl +179 -0
  111. package/wgsl/CylinderRoll.wgsl +330 -0
  112. package/wgsl/DiamondWipe.wgsl +94 -0
  113. package/wgsl/DitherDissolve.wgsl +123 -0
  114. package/wgsl/FallOver.wgsl +164 -0
  115. package/wgsl/Fisheye.wgsl +93 -0
  116. package/wgsl/Halftone.wgsl +196 -0
  117. package/wgsl/Honeycomb.wgsl +222 -0
  118. package/wgsl/LightStreaks.wgsl +460 -0
  119. package/wgsl/PaperTear.wgsl +324 -0
  120. package/wgsl/PixelStretch.wgsl +298 -0
  121. package/wgsl/Prisms.wgsl +385 -0
  122. package/wgsl/Puzzle.wgsl +587 -0
  123. package/wgsl/Refraction.wgsl +294 -0
  124. package/wgsl/Shred.wgsl +259 -0
  125. package/wgsl/SpiralWipe.wgsl +165 -0
  126. package/wgsl/Tunnel.wgsl +177 -0
  127. package/wgsl/TvRoll.wgsl +165 -0
  128. package/wgsl/TvTurnOff.wgsl +196 -0
  129. package/wgsl/WhipPan.wgsl +177 -0
  130. package/wgsl/WhipSpin.wgsl +241 -0
  131. package/wgsl/WhipTilt.wgsl +291 -0
@@ -1,96 +1,102 @@
1
- # Catalog (gl-transitions@2.0.0)
1
+ # Catalog (gl-transitions@2.2.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
+ 149 transitions. Generated from gl-transitions.json; full details (parameter hints, authors, source links) in https://cdn.jsdelivr.net/npm/gl-transitions@2.2.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, WhipSpin, WhipTilt
13
+ - **vertical**: Bounce, BowTieVertical, CylinderRoll, FallOver, Shred, SplitSlideInOutVertical, SplitSlideInVertical, SplitSlideOutVertical, Squeeze, StaticWipe, TopBottom, TvRoll, TvTurnOff, WhipTilt, WipeDown, WipeUp
11
14
  - **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
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
17
+ - **3d**: BookFlip, Cube, Curtains, CylinderRoll, Doorway, FallOver, InvertedPageCurl, Prisms, Swap, Tunnel, WhipTilt
13
18
  - **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
19
+ - **retro**: DitherDissolve, DoomMelt, Halftone, LissajousTiles, StaticFade, StereoViewer, TvLostSignal, TvRoll, TvStatic, TvTurnOff
20
+ - **directional**: Directional, DirectionalEased, DirectionalScaled, DirectionalWarp, DirectionalWipe, PixelStretch, Slides, SquaresWipe, WhipPan
21
+ - **distort**: ButterflyWaveScrawler, ColorCoords, CrazyParametricFun, DisplacementMap, Fisheye, FlyEye, Kaleidoscope, Morph, PowerKaleido
22
+ - **chromatic**: ButterflyWaveScrawler, CylinderRoll, FlyEye, GlitchFlicker, GlitchMemories, PixelStretch, Squeeze, StripDatamoshGlitch
19
23
  - **color**: ColorDistance, ColorPhase, ColorWrap, FadeColor, FadeGrayscale, FlashFade, HsvFade
20
- - **directional**: Directional, DirectionalEased, DirectionalScaled, DirectionalWarp, DirectionalWipe, Slides, SquaresWipe
21
24
  - **glitch**: ColorWrap, GlitchBands, GlitchDisplace, GlitchFlicker, GlitchMemories, StripDatamoshGlitch, TvLostSignal
22
- - **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
+ - **motion-blur**: CylinderRoll, LightStreaks, TangentMotionBlur, WhipPan, WhipSpin, WhipTilt
28
+ - **radial**: ClockWipe, Honeycomb, Pinwheel, RadialWipe, SpiralWipe, Tunnel
29
+ - **tiles**: GridFlip, Honeycomb, LissajousTiles, Mosaic, Puzzle, TilesWave
25
30
  - **blur**: CrossZoom, DefocusBlur, LinearBlur, Revolve, ZoomInOut
26
- - **dissolve**: BlockDissolve, GlowDissolve, NoiseDissolve, PerlinDissolve, RandomSquares
27
31
  - **grid**: Chessboard, GridFlip, LissajousTiles, RandomSquares, SquaresWipe
32
+ - **pattern**: Chessboard, Crosshatch, DitherDissolve, Halftone, PolkaDotsCurtain
33
+ - **pixelate**: DitherDissolve, Hexagonalize, MosaicBlend, MosaicFade, Pixelize
34
+ - **stripes**: Comb, Prisms, Shred, WindowBlinds, WindowSlices
28
35
  - **burn**: BurnThrough, FilmBurn, GlowDissolve, UndulatingBurnOut
29
36
  - **circle**: CircleIris, CircleOpen, UndulatingBurnOut, ZoomInCircles
30
- - **iris**: CircleIris, CircleOpen, RectangleCover, RectangleIris
31
- - **pixelate**: Hexagonalize, MosaicBlend, MosaicFade, Pixelize
32
- - **tiles**: GridFlip, LissajousTiles, Mosaic, TilesWave
37
+ - **flash**: DreamyZoom, FlashFade, Overexposure, TvTurnOff
38
+ - **push**: Comb, Directional, DirectionalEased, DirectionalScaled
39
+ - **shadow**: Bounce, PaperTear, Puzzle, Shred
33
40
  - **wave**: ButterflyWaveScrawler, Dreamy, Ripple, TilesWave
34
41
  - **box**: Box, RectangleCover, RectangleIris
35
42
  - **displace**: ColorCoords, DisplacementMap, GlitchDisplace
36
- - **flash**: DreamyZoom, FlashFade, Overexposure
37
43
  - **flip**: BookFlip, GridFlip, SimpleFlip
44
+ - **glow**: GlowDissolve, LightStreaks, Refraction
38
45
  - **mosaic**: Mosaic, MosaicBlend, MosaicFade
39
- - **pattern**: Chessboard, Crosshatch, PolkaDotsCurtain
40
- - **push**: Directional, DirectionalEased, DirectionalScaled
41
- - **radial**: ClockWipe, Pinwheel, RadialWipe
42
46
  - **reflection**: Cube, Doorway, Swap
47
+ - **scanlines**: GlitchFlicker, TvLostSignal, TvRoll
48
+ - **spin**: RotateFade, RotateScaleVanish, WhipSpin
43
49
  - **squares**: Chessboard, RandomSquares, SquaresWipe
44
50
  - **static**: StaticFade, StaticWipe, TvStatic
51
+ - **warp**: CrossWarp, DirectionalWarp, Tunnel
45
52
  - **clock**: ClockWipe, RadialWipe
53
+ - **dots**: Halftone, PolkaDotsCurtain
54
+ - **fold**: Curtains, Fold
55
+ - **fragments**: Puzzle, Shatter
56
+ - **hexagon**: Hexagonalize, Honeycomb
46
57
  - **kaleidoscope**: Kaleidoscope, PowerKaleido
58
+ - **lens**: Fisheye, FlyEye
59
+ - **light**: LightStreaks, Overexposure
47
60
  - **luma**: LumaWipe, LuminanceMelt
48
61
  - **melt**: DoomMelt, LuminanceMelt
49
62
  - **page**: BookFlip, InvertedPageCurl
50
63
  - **psychedelic**: ColorWrap, CrazyParametricFun
51
64
  - **ripple**: Ripple, WaterDrop
52
- - **scanlines**: GlitchFlicker, TvLostSignal
53
- - **spin**: RotateFade, RotateScaleVanish
54
- - **stripes**: WindowBlinds, WindowSlices
65
+ - **roll**: CylinderRoll, Rolls
66
+ - **slices**: Shred, WindowSlices
55
67
  - **swirl**: Revolve, Swirl
56
- - **warp**: CrossWarp, DirectionalWarp
57
68
  - **blinds**: WindowBlinds
58
69
  - **blocks**: BlockDissolve
59
70
  - **bounce**: Bounce
60
71
  - **cards**: StereoViewer
72
+ - **chromatic-aberration**: Refraction
61
73
  - **columns**: DoomMelt
62
74
  - **cube**: Cube
63
75
  - **curl**: InvertedPageCurl
64
76
  - **datamosh**: StripDatamoshGlitch
77
+ - **distortion**: Refraction
65
78
  - **doors**: Doorway
66
- - **dots**: PolkaDotsCurtain
67
79
  - **edges**: EdgeGlow
68
80
  - **film**: FilmBurn
69
81
  - **fire**: BurnThrough
82
+ - **flare**: LightStreaks
70
83
  - **flicker**: GlitchFlicker
71
- - **fold**: Fold
72
- - **fragments**: Shatter
73
- - **glow**: GlowDissolve
74
84
  - **grayscale**: FadeGrayscale
75
85
  - **heart**: HeartWipe
76
- - **hexagon**: Hexagonalize
77
86
  - **hue**: HsvFade
78
- - **lens**: FlyEye
79
- - **light**: Overexposure
80
87
  - **light-leak**: FilmBurn
81
88
  - **lines**: Crosshatch
82
89
  - **mask**: LumaWipe
83
90
  - **morph**: Morph
84
91
  - **motion**: LissajousTiles
85
- - **motion-blur**: TangentMotionBlur
86
92
  - **pinwheel**: Pinwheel
87
93
  - **polar**: FlowerWipe
88
- - **roll**: Rolls
89
- - **shadow**: Bounce
94
+ - **refraction**: Refraction
90
95
  - **shatter**: Shatter
91
- - **slices**: WindowSlices
96
+ - **smear**: PixelStretch
92
97
  - **squeeze**: Squeeze
93
98
  - **star**: StarWipe
99
+ - **streaks**: PixelStretch
94
100
  - **swap**: Swap
95
101
  - **water**: WaterDrop
96
102
 
@@ -98,6 +104,7 @@
98
104
 
99
105
  `name`: description. Parameters as name (type = default). Extra textures are flagged: the host must provide them.
100
106
 
107
+ - `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
108
  - `BlockDissolve`: The incoming image appears in small random blocks. Params: blocksize (float = 0.02)
102
109
  - `BookFlip`: The outgoing image turns like a book page from right to left, revealing the incoming one
103
110
  - `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 +122,23 @@
115
122
  - `ColorDistance`: Pixels switch to the incoming image in order of how close their colors are. Params: power (float = 5)
116
123
  - `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
124
  - `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)
125
+ - `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
126
  - `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
127
  - `CrossWarp`: The outgoing image zooms in while the incoming one zooms out into place, sweeping from right to left
120
128
  - `CrossZoom`: A crossfade through a strong zoom blur. Params: strength (float = 0.4)
121
129
  - `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
130
  - `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)
131
+ - `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)
132
+ - `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)
123
133
  - `DefocusBlur`: A crossfade through an out-of-focus blur. Params: blurSize (float = 0.02)
134
+ - `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
135
  - `Directional`: The incoming image pushes the outgoing one out in a given direction. Params: direction (vec2 = vec2(0, 1))
125
136
  - `DirectionalEased`: Like Directional, with an eased movement. Params: direction (vec2 = vec2(0, 1))
126
137
  - `DirectionalScaled`: Like Directional, with both images scaled down while they slide. Params: direction (vec2 = vec2(0, 1)), scale (float = 0.7)
127
138
  - `DirectionalWarp`: A diagonal wipe with a warped, smeared edge. Params: smoothness (float = 0.1), direction (vec2 = vec2(-1, 1))
128
139
  - `DirectionalWipe`: A soft-edged diagonal wipe. Params: direction (vec2 = vec2(1, -1)), smoothness (float = 0.5)
129
140
  - `DisplacementMap`: A crossfade in which a displacement map (an extra grayscale texture) warps both images. Params: strength (float = 0.5). Extra textures: displacementMap
141
+ - `DitherDissolve`: The incoming image appears through a regular 8x8 ordered dither pattern, like a retro computer screen. Params: dotSize (float = 0.02)
130
142
  - `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
143
  - `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
144
  - `Dreamy`: A crossfade with a gentle wavy distortion
@@ -135,7 +147,9 @@
135
147
  - `Fade`: A linear crossfade between the two images
136
148
  - `FadeColor`: A fade through a solid color, black by default. Params: color (vec4 = vec4(0, 0, 0, 1)), colorPhase (float = 0.4)
137
149
  - `FadeGrayscale`: A crossfade through grayscale. Params: intensity (float = 0.3)
150
+ - `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
151
  - `FilmBurn`: Glowing film-burn light leaks wash over the image and reveal the incoming one. Params: Seed (float = 2.31)
152
+ - `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
153
  - `FlashFade`: A crossfade that brightens toward a color in the middle. Params: color (vec3 = vec3(0.9, 0.4, 0.2))
140
154
  - `FlowerWipe`: A flower shape with several petals grows to reveal the incoming image. Params: segments (int = 5)
141
155
  - `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 +160,10 @@
146
160
  - `GlitchMemories`: A crossfade with glitchy, color-shifted blocks
147
161
  - `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
162
  - `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)
163
+ - `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
164
  - `HeartWipe`: A heart shape grows from the center to reveal the incoming image
150
165
  - `Hexagonalize`: Both images turn into hexagons, crossfade, then sharpen again. Params: steps (int = 50), horizontalHexagons (float = 20)
166
+ - `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
167
  - `HorizontalClose`: The incoming image closes in from the top and bottom edges toward the middle
152
168
  - `HorizontalOpen`: The incoming image opens from a line in the middle toward the top and bottom edges
153
169
  - `HsvFade`: A crossfade through the HSV color space that cycles through hues
@@ -155,6 +171,7 @@
155
171
  - `Kaleidoscope`: A crossfade through a spinning kaleidoscope. Params: speed (float = 1), angle (float = 1), power (float = 1.5)
156
172
  - `LeafWipe`: A leaf shape grows from the center to reveal the incoming image
157
173
  - `LeftRight`: The outgoing image shrinks away to the left while the incoming one slides in from the right
174
+ - `LightStreaks`: The highlights of the outgoing image flare into long horizontal (or vertical) lens streaks while it smears with motion blur; at the peak the incoming image takes over and its streaks shrink back into its highlights as it sharpens. Params: reach (float = 0.6), threshold (float = 0.7), intensity (float = 1.5), tint (vec3 = vec3(0.45, 0.7, 1)), blur (float = 0.1), vertical (bool = false)
158
175
  - `LinearBlur`: A crossfade through a blur. Params: intensity (float = 0.1)
159
176
  - `LissajousTiles`: The image breaks into a grid of tiles that swirl along Lissajous curves, in a Scanimate style, and flip one by one to the incoming image before settling back. Params: speed (float = 0.5), freq (vec2 = vec2(2, 3)), offset (float = 2), zoom (float = 0.8), fade (float = 3)
160
177
  - `LumaWipe`: A wipe that follows the brightness of a grayscale mask (the luma texture). Extra textures: luma
@@ -166,15 +183,20 @@
166
183
  - `MultiplyBlend`: A crossfade through the multiplied blend of both images
167
184
  - `NoiseDissolve`: The incoming image appears pixel by pixel in random noise
168
185
  - `Overexposure`: A crossfade through a washed-out, overexposed white. Params: strength (float = 0.6)
186
+ - `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
187
  - `PerlinDissolve`: The incoming image appears through blobs of Perlin noise. Params: scale (float = 4), smoothness (float = 0.01), seed (float = 12.9898)
170
188
  - `Pinwheel`: A spinning pinwheel reveals the incoming image. Params: speed (float = 2)
189
+ - `PixelStretch`: A line sweeps across the frame and drags the outgoing image's pixels behind it as long streaks, which shorten as it goes and reveal the incoming image. Params: direction (vec2 = vec2(1, 0)), stretch (float = 0.45), chroma (float = 0.5), softness (float = 0.03), jitter (float = 0.5)
171
190
  - `Pixelize`: Both images pixelate, crossfade, then sharpen again. Params: squaresMin (ivec2 = ivec2(20, 20)), steps (int = 50)
172
191
  - `PolkaDotsCurtain`: The incoming image appears through growing polka dots. Params: dots (float = 20), center (vec2 = vec2(0, 0))
173
192
  - `PowerKaleido`: The image folds into an animated kaleidoscope before revealing the incoming one. Params: scale (float = 2), z (float = 1.5), speed (float = 5)
193
+ - `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))
194
+ - `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
195
  - `RadialWipe`: A radial wipe that sweeps around the center like a clock hand. Params: smoothness (float = 1)
175
196
  - `RandomSquares`: The incoming image appears in random squares. Params: size (ivec2 = ivec2(10, 10)), smoothness (float = 0.5)
176
197
  - `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))
177
198
  - `RectangleIris`: The outgoing image shrinks into a small rectangle over a background color, then the incoming one grows from it. Params: bgcolor (vec4 = vec4(0, 0, 0, 1))
199
+ - `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)
178
200
  - `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)
179
201
  - `Ripple`: Ripples spread from the center while crossfading. Params: amplitude (float = 100), speed (float = 50)
180
202
  - `Rolls`: The outgoing image rolls away around a corner, revealing the incoming one. Params: type (int = 0), RotDown (bool = false)
@@ -183,11 +205,13 @@
183
205
  - `RotateScaleVanish`: The outgoing image spins and shrinks away over the incoming one. Params: FadeInSecond (bool = true), ReverseEffect (bool = false), ReverseRotation (bool = false)
184
206
  - `ScaleIn`: The incoming image scales in from the center while fading in
185
207
  - `Shatter`: The outgoing image shatters into fragments that fly away
208
+ - `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
209
  - `SimpleFlip`: The outgoing image flips around the vertical axis into the incoming one
187
210
  - `SimpleZoom`: Zooms into the outgoing image, then fades to the incoming one. Params: zoom_quickness (float = 0.8)
188
211
  - `SimpleZoomOut`: The incoming image zooms out into place while fading in. Params: zoom_quickness (float = 0.8), fade (bool = true)
189
212
  - `SlideAwayRight`: The outgoing image slides to the right, uncovering a crossfade to the incoming one
190
213
  - `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)
214
+ - `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
215
  - `SplitSlideInHorizontal`: The incoming image slides in as two halves moving horizontally in opposite directions. Params: reverse (bool = false)
192
216
  - `SplitSlideInOutHorizontal`: The halves of both images slide horizontally in opposite directions, out and in at once. Params: reverse (bool = false)
193
217
  - `SplitSlideInOutVertical`: The halves of both images slide vertically in opposite directions, out and in at once. Params: reverse (bool = false)
@@ -206,12 +230,18 @@
206
230
  - `TangentMotionBlur`: The outgoing image is flung away along a curve with motion blur
207
231
  - `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
232
  - `TopBottom`: The outgoing image shrinks away upward while the incoming one slides in from the bottom
233
+ - `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
234
  - `TvLostSignal`: A crossfade with drifting tracking lines and tearing, like a TV losing its signal
235
+ - `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
236
  - `TvStatic`: Cuts to full-screen TV static, then to the incoming image. Params: offset (float = 0.05)
237
+ - `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
238
  - `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
239
  - `VerticalClose`: The incoming image closes in from the left and right edges toward the middle
213
240
  - `VerticalOpen`: The incoming image opens from a line in the middle toward the left and right edges
214
241
  - `WaterDrop`: Ripples spread from the center like a drop falling into water, crossfading to the incoming image. Params: amplitude (float = 30), speed (float = 30)
242
+ - `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)
243
+ - `WhipSpin`: The camera rolls faster and faster around the center of the frame, streaking the outgoing image in a spin blur, then the incoming one takes over mid-spin and slows to a stop. Params: turns (float = 1), blur (float = 0.5), chroma (float = 0.6), zoom (float = 0.25)
244
+ - `WhipTilt`: The camera tilts fast from the outgoing image to the incoming one, set edge to edge at an angle above it, streaking both in perspective with a vertical motion blur. Params: down (bool = false), blur (float = 0.5), chroma (float = 0.5), perspective (float = 0.7)
215
245
  - `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
246
  - `WindowBlinds`: A crossfade through horizontal window blinds
217
247
  - `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,112 @@
1
+ // CylinderRoll — generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/CylinderRoll.glsl
2
+ // Author: gre
3
+ // License: MIT
4
+ // Description: 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
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 curvature;
16
+
17
+ uniform float blur;
18
+
19
+ uniform float shading;
20
+
21
+ uniform float chroma;
22
+
23
+ uniform int downward;
24
+
25
+ const int SAMPLES = 24;
26
+
27
+ const float MAX_ANGLE = 1.1;
28
+
29
+ const float DIST = 2.6;
30
+
31
+ const float ARC = 0.12;
32
+
33
+ float hash(vec2 c) {
34
+ vec2 q = fract(c * vec2(0.1031, 0.1030));
35
+ q += dot(q, q.yx + 33.33);
36
+ return fract((q.x + q.y) * q.x);
37
+ }
38
+
39
+ float fold(float v) {
40
+ return 1.0 - abs(1.0 - mod(v, 2.0));
41
+ }
42
+
43
+ vec4 strip(float x, float v) {
44
+ if ((downward != 0) ? v > 1.0 : v < 0.0) {
45
+ return getToColor(vec2(x, fold((downward != 0) ? v - 1.0 : v + 1.0)));
46
+ }
47
+ return getFromColor(vec2(x, fold(v)));
48
+ }
49
+
50
+ float angleAt(float c) {
51
+ c = clamp(c, -0.98 / sqrt(DIST * DIST - 1.0), 0.98 / sqrt(DIST * DIST - 1.0));
52
+ return asin(c * DIST / sqrt(1.0 + c * c)) - atan(c);
53
+ }
54
+
55
+ vec4 transition(vec2 uv) {
56
+ float p = progress;
57
+
58
+ float h = 1.0 - abs(2.0 * p - 1.0);
59
+ float e = 0.5 * h * (0.1 + 0.9 * h * h);
60
+ float roll = p < 0.5 ? e : 1.0 - e;
61
+
62
+ float h3 = h * h * h;
63
+ float peak = h3 * h3;
64
+
65
+
66
+ float bend = curvature * (p < 0.5 ? h * (2.0 - h) : h * h * (3.0 - 2.0 * h));
67
+ float phi = MAX_ANGLE * bend + 1e-4;
68
+ float arcK = ARC * bend;
69
+
70
+ float edgeY = sin(phi) / (DIST - cos(phi));
71
+
72
+ vec2 n = 2.0 * uv - 1.0;
73
+
74
+ float xr = n.x * ratio;
75
+ float yn = n.y * (1.0 + arcK * xr * xr);
76
+ float theta = angleAt(yn * edgeY);
77
+
78
+ float thetaCorner = angleAt((1.0 + arcK * ratio * ratio) * edgeY);
79
+ float width = (DIST - 1.0) / (DIST - cos(theta));
80
+ float zoom = (DIST - cos(thetaCorner)) / (DIST - 1.0);
81
+ float x = 0.5 + 0.5 * n.x / (zoom * width);
82
+
83
+ float facing = (DIST * cos(theta) - 1.0)
84
+ / sqrt(1.0 + DIST * DIST - 2.0 * DIST * cos(theta)) ;
85
+ float light = mix(1.0, clamp(facing, 0.0, 1.0), shading);
86
+
87
+
88
+ float v = 0.5 * (theta / phi + 1.0) + ((downward != 0) ? roll : -roll);
89
+ float len = 0.5 * blur * peak;
90
+ float split = chroma * peak;
91
+ float jitter = hash(uv * 1000.0);
92
+ vec3 color = vec3(0.0);
93
+ vec3 weight = vec3(0.0);
94
+ float alpha = 0.0;
95
+ for (int i = 0; i < SAMPLES; i++) {
96
+ float t = (float(i) + jitter) / float(SAMPLES) - 0.5;
97
+ vec4 img = strip(x, v + t * len);
98
+
99
+ vec3 w = vec3(max(1.0 - 4.0 * split * t, 0.0), 1.0, max(1.0 + 4.0 * split * t, 0.0));
100
+ color += img.rgb * img.a * w;
101
+ weight += img.a * w;
102
+ alpha += img.a;
103
+ }
104
+ color = color / max(weight, vec3(1e-5));
105
+ return vec4(color * light, alpha / float(SAMPLES));
106
+ }
107
+
108
+ half4 main(float2 _coord) {
109
+ vec2 _uv = _coord / _resolution;
110
+ vec4 _c = clamp(transition(vec2(_uv.x, 1.0 - _uv.y)), 0.0, 1.0);
111
+ return half4(_c.rgb * _c.a, _c.a);
112
+ }
@@ -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
+ }