gl-transitions 3.4.0 → 3.5.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.
- package/CHANGELOG.md +228 -0
- package/compatibility.json +2316 -588
- package/gl-transitions.js +1 -1
- package/gl-transitions.json +1 -1
- package/glsl3/AccretionDisk.glsl +165 -0
- package/glsl3/AirShow.glsl +126 -0
- package/glsl3/Alike.glsl +97 -0
- package/glsl3/Anaglyph.glsl +27 -0
- package/glsl3/Anodize.glsl +34 -0
- package/glsl3/Atom.glsl +68 -0
- package/glsl3/BadBytes.glsl +56 -0
- package/glsl3/BentRays.glsl +47 -0
- package/glsl3/BlackLight.glsl +48 -0
- package/glsl3/Bleach.glsl +93 -0
- package/glsl3/Blueprint.glsl +64 -0
- package/glsl3/BowTie.glsl +15 -6
- package/glsl3/BoxClose.glsl +67 -0
- package/glsl3/Braid.glsl +134 -0
- package/glsl3/Buffering.glsl +47 -0
- package/glsl3/Bullseyes.glsl +86 -0
- package/glsl3/Captcha.glsl +65 -0
- package/glsl3/CardStunt.glsl +57 -0
- package/glsl3/Centrifuge.glsl +90 -0
- package/glsl3/Champagne.glsl +117 -0
- package/glsl3/Choppy.glsl +69 -0
- package/glsl3/Chrysanthemum.glsl +71 -0
- package/glsl3/CloudBanks.glsl +161 -0
- package/glsl3/Coalesce.glsl +91 -0
- package/glsl3/ColorFields.glsl +33 -0
- package/glsl3/ColorPowder.glsl +64 -0
- package/glsl3/CrossProcess.glsl +29 -0
- package/glsl3/CryoJets.glsl +111 -0
- package/glsl3/Curdle.glsl +50 -0
- package/glsl3/DarkAdapt.glsl +41 -0
- package/glsl3/Denoise.glsl +48 -0
- package/glsl3/Dunk.glsl +73 -0
- package/glsl3/EmptySlot.glsl +105 -0
- package/glsl3/EuclidSquares.glsl +79 -0
- package/glsl3/Filament.glsl +29 -0
- package/glsl3/FilmBurn.glsl +25 -12
- package/glsl3/FiveTriangles.glsl +94 -0
- package/glsl3/FlowDissolve.glsl +53 -27
- package/glsl3/FoilBalloon.glsl +123 -0
- package/glsl3/FoldedInk.glsl +147 -0
- package/glsl3/ForceField.glsl +104 -0
- package/glsl3/FullHouse.glsl +79 -0
- package/glsl3/GalacticYear.glsl +80 -0
- package/glsl3/Gliders.glsl +70 -0
- package/glsl3/GoldenAngle.glsl +104 -0
- package/glsl3/GoldenHour.glsl +47 -0
- package/glsl3/Grisaille.glsl +72 -0
- package/glsl3/HandPlane.glsl +68 -0
- package/glsl3/HandPrints.glsl +88 -0
- package/glsl3/Headlong.glsl +109 -0
- package/glsl3/Highlighter.glsl +65 -0
- package/glsl3/HoneycombFill.glsl +77 -0
- package/glsl3/HueDepth.glsl +96 -0
- package/glsl3/IceFerns.glsl +82 -0
- package/glsl3/ImpactFrames.glsl +120 -0
- package/glsl3/JacquardWeave.glsl +88 -0
- package/glsl3/JetStreams.glsl +91 -0
- package/glsl3/KickSnare.glsl +59 -0
- package/glsl3/Ladle.glsl +49 -0
- package/glsl3/Lichen.glsl +93 -0
- package/glsl3/Linkup.glsl +211 -0
- package/glsl3/Luminol.glsl +56 -0
- package/glsl3/MeltedCrayons.glsl +91 -0
- package/glsl3/Merger.glsl +70 -0
- package/glsl3/Minesweeper.glsl +134 -0
- package/glsl3/MotionDrift.glsl +51 -0
- package/glsl3/Multitude.glsl +65 -0
- package/glsl3/NailPolish.glsl +71 -0
- package/glsl3/PaintDissolve.glsl +19 -12
- package/glsl3/Photocopy.glsl +65 -0
- package/glsl3/Physarum.glsl +106 -0
- package/glsl3/Pound.glsl +64 -0
- package/glsl3/Primitives.glsl +71 -0
- package/glsl3/ProgressiveLoad.glsl +45 -0
- package/glsl3/Quicksilver.glsl +111 -0
- package/glsl3/Rebound.glsl +84 -0
- package/glsl3/Recast.glsl +49 -0
- package/glsl3/Resurface.glsl +59 -0
- package/glsl3/RoughToFine.glsl +87 -0
- package/glsl3/SandThrough.glsl +54 -0
- package/glsl3/ShadowPlay.glsl +46 -0
- package/glsl3/Shatter.glsl +55 -35
- package/glsl3/Shoal.glsl +132 -0
- package/glsl3/Simmer.glsl +143 -0
- package/glsl3/SkiTracks.glsl +97 -0
- package/glsl3/SlidingGrid.glsl +120 -0
- package/glsl3/Slipstream.glsl +152 -0
- package/glsl3/Somersault.glsl +86 -0
- package/glsl3/Sparkler.glsl +81 -0
- package/glsl3/SpectralTrails.glsl +69 -0
- package/glsl3/Spectrum.glsl +65 -0
- package/glsl3/StarTrails.glsl +124 -0
- package/glsl3/Streamgraph.glsl +65 -0
- package/glsl3/SunDisc.glsl +161 -0
- package/glsl3/Supergraphic.glsl +147 -0
- package/glsl3/Swell.glsl +113 -0
- package/glsl3/ThreeInks.glsl +131 -0
- package/glsl3/TidalBands.glsl +136 -0
- package/glsl3/TigerEye.glsl +65 -0
- package/glsl3/TileBlast.glsl +25 -9
- package/glsl3/TileShuffle.glsl +48 -35
- package/glsl3/Tinsel.glsl +49 -0
- package/glsl3/Toggles.glsl +63 -0
- package/glsl3/TonalHills.glsl +162 -0
- package/glsl3/ToneBurst.glsl +112 -0
- package/glsl3/Torsion.glsl +37 -0
- package/glsl3/Treemap.glsl +80 -0
- package/glsl3/TripleMatch.glsl +99 -0
- package/glsl3/TwinDragons.glsl +51 -0
- package/glsl3/Undercover.glsl +76 -0
- package/glsl3/Undulate.glsl +54 -0
- package/glsl3/Venn.glsl +48 -0
- package/glsl3/WaterWindow.glsl +89 -0
- package/glsl3/Whirl.glsl +73 -0
- package/glsl3/Wrench.glsl +22 -10
- package/glsl3/XorSquares.glsl +50 -0
- package/index.js +1 -1
- package/layouts.json +6100 -2927
- package/llms-full.txt +2390 -697
- package/llms.txt +458 -350
- package/msl/AccretionDisk.metal +821 -0
- package/msl/AirShow.metal +524 -0
- package/msl/Alike.metal +996 -0
- package/msl/Anaglyph.metal +164 -0
- package/msl/Anodize.metal +168 -0
- package/msl/Atom.metal +324 -0
- package/msl/BadBytes.metal +309 -0
- package/msl/BentRays.metal +237 -0
- package/msl/BlackLight.metal +277 -0
- package/msl/Bleach.metal +489 -0
- package/msl/Blueprint.metal +336 -0
- package/msl/BowTie.metal +162 -110
- package/msl/BoxClose.metal +382 -0
- package/msl/Braid.metal +723 -0
- package/msl/Buffering.metal +227 -0
- package/msl/Bullseyes.metal +416 -0
- package/msl/Captcha.metal +306 -0
- package/msl/CardStunt.metal +275 -0
- package/msl/Centrifuge.metal +495 -0
- package/msl/Champagne.metal +613 -0
- package/msl/Choppy.metal +362 -0
- package/msl/Chrysanthemum.metal +358 -0
- package/msl/CloudBanks.metal +844 -0
- package/msl/Coalesce.metal +475 -0
- package/msl/ColorFields.metal +182 -0
- package/msl/ColorPowder.metal +325 -0
- package/msl/CrossProcess.metal +162 -0
- package/msl/CryoJets.metal +462 -0
- package/msl/Curdle.metal +241 -0
- package/msl/DarkAdapt.metal +196 -0
- package/msl/Denoise.metal +242 -0
- package/msl/Dunk.metal +365 -0
- package/msl/EmptySlot.metal +600 -0
- package/msl/EuclidSquares.metal +476 -0
- package/msl/Filament.metal +183 -0
- package/msl/FilmBurn.metal +311 -270
- package/msl/FiveTriangles.metal +576 -0
- package/msl/FlowDissolve.metal +438 -269
- package/msl/FoilBalloon.metal +628 -0
- package/msl/FoldedInk.metal +836 -0
- package/msl/ForceField.metal +480 -0
- package/msl/FullHouse.metal +376 -0
- package/msl/GalacticYear.metal +384 -0
- package/msl/Gliders.metal +417 -0
- package/msl/GoldenAngle.metal +466 -0
- package/msl/GoldenHour.metal +240 -0
- package/msl/Grisaille.metal +382 -0
- package/msl/HandPlane.metal +374 -0
- package/msl/HandPrints.metal +520 -0
- package/msl/Headlong.metal +552 -0
- package/msl/Highlighter.metal +334 -0
- package/msl/HoneycombFill.metal +332 -0
- package/msl/HueDepth.metal +425 -0
- package/msl/IceFerns.metal +431 -0
- package/msl/ImpactFrames.metal +628 -0
- package/msl/JacquardWeave.metal +447 -0
- package/msl/JetStreams.metal +420 -0
- package/msl/KickSnare.metal +336 -0
- package/msl/Ladle.metal +253 -0
- package/msl/Lichen.metal +420 -0
- package/msl/Linkup.metal +1334 -0
- package/msl/Luminol.metal +305 -0
- package/msl/MeltedCrayons.metal +432 -0
- package/msl/Merger.metal +370 -0
- package/msl/Minesweeper.metal +662 -0
- package/msl/MotionDrift.metal +259 -0
- package/msl/Multitude.metal +382 -0
- package/msl/NailPolish.metal +377 -0
- package/msl/PaintDissolve.metal +856 -764
- package/msl/Photocopy.metal +343 -0
- package/msl/Physarum.metal +476 -0
- package/msl/Pound.metal +279 -0
- package/msl/Primitives.metal +431 -0
- package/msl/ProgressiveLoad.metal +264 -0
- package/msl/Quicksilver.metal +498 -0
- package/msl/Rebound.metal +435 -0
- package/msl/Recast.metal +229 -0
- package/msl/Resurface.metal +314 -0
- package/msl/RoughToFine.metal +438 -0
- package/msl/SandThrough.metal +288 -0
- package/msl/ShadowPlay.metal +252 -0
- package/msl/Shatter.metal +891 -788
- package/msl/Shoal.metal +614 -0
- package/msl/Simmer.metal +684 -0
- package/msl/SkiTracks.metal +483 -0
- package/msl/SlidingGrid.metal +593 -0
- package/msl/Slipstream.metal +836 -0
- package/msl/Somersault.metal +491 -0
- package/msl/Sparkler.metal +341 -0
- package/msl/SpectralTrails.metal +295 -0
- package/msl/Spectrum.metal +291 -0
- package/msl/StarTrails.metal +572 -0
- package/msl/Streamgraph.metal +375 -0
- package/msl/SunDisc.metal +844 -0
- package/msl/Supergraphic.metal +798 -0
- package/msl/Swell.metal +529 -0
- package/msl/ThreeInks.metal +627 -0
- package/msl/TidalBands.metal +711 -0
- package/msl/TigerEye.metal +367 -0
- package/msl/TileBlast.metal +729 -604
- package/msl/TileShuffle.metal +824 -799
- package/msl/Tinsel.metal +243 -0
- package/msl/Toggles.metal +327 -0
- package/msl/TonalHills.metal +856 -0
- package/msl/ToneBurst.metal +526 -0
- package/msl/Torsion.metal +198 -0
- package/msl/Treemap.metal +385 -0
- package/msl/TripleMatch.metal +417 -0
- package/msl/TwinDragons.metal +281 -0
- package/msl/Undercover.metal +425 -0
- package/msl/Undulate.metal +314 -0
- package/msl/Venn.metal +228 -0
- package/msl/WaterWindow.metal +426 -0
- package/msl/Whirl.metal +317 -0
- package/msl/Wrench.metal +798 -730
- package/msl/XorSquares.metal +277 -0
- package/package.json +1 -1
- package/skills/gl-transitions/references/catalog.md +360 -142
- package/sksl/AccretionDisk.sksl +177 -0
- package/sksl/AirShow.sksl +138 -0
- package/sksl/Alike.sksl +105 -0
- package/sksl/Anaglyph.sksl +40 -0
- package/sksl/Anodize.sksl +47 -0
- package/sksl/Atom.sksl +81 -0
- package/sksl/BadBytes.sksl +66 -0
- package/sksl/BentRays.sksl +59 -0
- package/sksl/BlackLight.sksl +61 -0
- package/sksl/Bleach.sksl +106 -0
- package/sksl/Blueprint.sksl +77 -0
- package/sksl/BowTie.sksl +14 -6
- package/sksl/BoxClose.sksl +78 -0
- package/sksl/Braid.sksl +145 -0
- package/sksl/Buffering.sksl +60 -0
- package/sksl/Bullseyes.sksl +97 -0
- package/sksl/Captcha.sksl +78 -0
- package/sksl/CardStunt.sksl +70 -0
- package/sksl/Centrifuge.sksl +103 -0
- package/sksl/Champagne.sksl +130 -0
- package/sksl/Choppy.sksl +80 -0
- package/sksl/Chrysanthemum.sksl +83 -0
- package/sksl/CloudBanks.sksl +171 -0
- package/sksl/Coalesce.sksl +102 -0
- package/sksl/ColorFields.sksl +46 -0
- package/sksl/ColorPowder.sksl +77 -0
- package/sksl/CrossProcess.sksl +42 -0
- package/sksl/CryoJets.sksl +123 -0
- package/sksl/Curdle.sksl +63 -0
- package/sksl/DarkAdapt.sksl +54 -0
- package/sksl/Denoise.sksl +60 -0
- package/sksl/Dunk.sksl +86 -0
- package/sksl/EmptySlot.sksl +116 -0
- package/sksl/EuclidSquares.sksl +90 -0
- package/sksl/Filament.sksl +42 -0
- package/sksl/FilmBurn.sksl +25 -12
- package/sksl/FiveTriangles.sksl +107 -0
- package/sksl/FlowDissolve.sksl +50 -26
- package/sksl/FoilBalloon.sksl +135 -0
- package/sksl/FoldedInk.sksl +159 -0
- package/sksl/ForceField.sksl +115 -0
- package/sksl/FullHouse.sksl +92 -0
- package/sksl/GalacticYear.sksl +91 -0
- package/sksl/Gliders.sksl +82 -0
- package/sksl/GoldenAngle.sksl +115 -0
- package/sksl/GoldenHour.sksl +60 -0
- package/sksl/Grisaille.sksl +84 -0
- package/sksl/HandPlane.sksl +80 -0
- package/sksl/HandPrints.sksl +100 -0
- package/sksl/Headlong.sksl +120 -0
- package/sksl/Highlighter.sksl +77 -0
- package/sksl/HoneycombFill.sksl +90 -0
- package/sksl/HueDepth.sksl +108 -0
- package/sksl/IceFerns.sksl +95 -0
- package/sksl/ImpactFrames.sksl +130 -0
- package/sksl/JacquardWeave.sksl +99 -0
- package/sksl/JetStreams.sksl +100 -0
- package/sksl/KickSnare.sksl +69 -0
- package/sksl/Ladle.sksl +62 -0
- package/sksl/Lichen.sksl +106 -0
- package/sksl/Linkup.sksl +220 -0
- package/sksl/Luminol.sksl +68 -0
- package/sksl/MeltedCrayons.sksl +104 -0
- package/sksl/Merger.sksl +82 -0
- package/sksl/Minesweeper.sksl +145 -0
- package/sksl/MotionDrift.sksl +61 -0
- package/sksl/Multitude.sksl +78 -0
- package/sksl/NailPolish.sksl +83 -0
- package/sksl/PaintDissolve.sksl +18 -11
- package/sksl/Photocopy.sksl +77 -0
- package/sksl/Physarum.sksl +116 -0
- package/sksl/Pound.sksl +77 -0
- package/sksl/Primitives.sksl +81 -0
- package/sksl/ProgressiveLoad.sksl +58 -0
- package/sksl/Quicksilver.sksl +122 -0
- package/sksl/Rebound.sksl +97 -0
- package/sksl/Recast.sksl +60 -0
- package/sksl/Resurface.sksl +71 -0
- package/sksl/RoughToFine.sksl +98 -0
- package/sksl/SandThrough.sksl +67 -0
- package/sksl/ShadowPlay.sksl +59 -0
- package/sksl/Shatter.sksl +55 -35
- package/sksl/Shoal.sksl +143 -0
- package/sksl/Simmer.sksl +154 -0
- package/sksl/SkiTracks.sksl +110 -0
- package/sksl/SlidingGrid.sksl +131 -0
- package/sksl/Slipstream.sksl +162 -0
- package/sksl/Somersault.sksl +96 -0
- package/sksl/Sparkler.sksl +93 -0
- package/sksl/SpectralTrails.sksl +81 -0
- package/sksl/Spectrum.sksl +77 -0
- package/sksl/StarTrails.sksl +135 -0
- package/sksl/Streamgraph.sksl +78 -0
- package/sksl/SunDisc.sksl +172 -0
- package/sksl/Supergraphic.sksl +158 -0
- package/sksl/Swell.sksl +124 -0
- package/sksl/ThreeInks.sksl +142 -0
- package/sksl/TidalBands.sksl +148 -0
- package/sksl/TigerEye.sksl +76 -0
- package/sksl/TileBlast.sksl +23 -8
- package/sksl/TileShuffle.sksl +45 -35
- package/sksl/Tinsel.sksl +62 -0
- package/sksl/Toggles.sksl +75 -0
- package/sksl/TonalHills.sksl +174 -0
- package/sksl/ToneBurst.sksl +124 -0
- package/sksl/Torsion.sksl +50 -0
- package/sksl/Treemap.sksl +93 -0
- package/sksl/TripleMatch.sksl +110 -0
- package/sksl/TwinDragons.sksl +63 -0
- package/sksl/Undercover.sksl +87 -0
- package/sksl/Undulate.sksl +65 -0
- package/sksl/Venn.sksl +60 -0
- package/sksl/WaterWindow.sksl +101 -0
- package/sksl/Whirl.sksl +85 -0
- package/sksl/Wrench.sksl +22 -10
- package/sksl/XorSquares.sksl +63 -0
- package/sksl/index.js +1 -1
- package/transitions/AccretionDisk.glsl +164 -0
- package/transitions/AirShow.glsl +125 -0
- package/transitions/Alike.glsl +96 -0
- package/transitions/Anaglyph.glsl +26 -0
- package/transitions/Anodize.glsl +33 -0
- package/transitions/Atom.glsl +67 -0
- package/transitions/BadBytes.glsl +55 -0
- package/transitions/BentRays.glsl +46 -0
- package/transitions/BlackLight.glsl +47 -0
- package/transitions/Bleach.glsl +92 -0
- package/transitions/Blueprint.glsl +63 -0
- package/transitions/BowTie.glsl +15 -6
- package/transitions/BoxClose.glsl +66 -0
- package/transitions/Braid.glsl +133 -0
- package/transitions/Buffering.glsl +46 -0
- package/transitions/Bullseyes.glsl +85 -0
- package/transitions/Captcha.glsl +64 -0
- package/transitions/CardStunt.glsl +56 -0
- package/transitions/Centrifuge.glsl +89 -0
- package/transitions/Champagne.glsl +116 -0
- package/transitions/Choppy.glsl +68 -0
- package/transitions/Chrysanthemum.glsl +70 -0
- package/transitions/CloudBanks.glsl +160 -0
- package/transitions/Coalesce.glsl +90 -0
- package/transitions/ColorFields.glsl +32 -0
- package/transitions/ColorPowder.glsl +63 -0
- package/transitions/CrossProcess.glsl +28 -0
- package/transitions/CryoJets.glsl +110 -0
- package/transitions/Curdle.glsl +49 -0
- package/transitions/DarkAdapt.glsl +40 -0
- package/transitions/Denoise.glsl +47 -0
- package/transitions/Dunk.glsl +72 -0
- package/transitions/EmptySlot.glsl +104 -0
- package/transitions/EuclidSquares.glsl +78 -0
- package/transitions/Filament.glsl +28 -0
- package/transitions/FilmBurn.glsl +25 -12
- package/transitions/FiveTriangles.glsl +93 -0
- package/transitions/FlowDissolve.glsl +53 -27
- package/transitions/FoilBalloon.glsl +122 -0
- package/transitions/FoldedInk.glsl +146 -0
- package/transitions/ForceField.glsl +103 -0
- package/transitions/FullHouse.glsl +78 -0
- package/transitions/GalacticYear.glsl +79 -0
- package/transitions/Gliders.glsl +69 -0
- package/transitions/GoldenAngle.glsl +103 -0
- package/transitions/GoldenHour.glsl +46 -0
- package/transitions/Grisaille.glsl +71 -0
- package/transitions/HandPlane.glsl +67 -0
- package/transitions/HandPrints.glsl +87 -0
- package/transitions/Headlong.glsl +108 -0
- package/transitions/Highlighter.glsl +64 -0
- package/transitions/HoneycombFill.glsl +76 -0
- package/transitions/HueDepth.glsl +95 -0
- package/transitions/IceFerns.glsl +81 -0
- package/transitions/ImpactFrames.glsl +119 -0
- package/transitions/JacquardWeave.glsl +87 -0
- package/transitions/JetStreams.glsl +90 -0
- package/transitions/KickSnare.glsl +58 -0
- package/transitions/Ladle.glsl +48 -0
- package/transitions/Lichen.glsl +92 -0
- package/transitions/Linkup.glsl +210 -0
- package/transitions/Luminol.glsl +55 -0
- package/transitions/MeltedCrayons.glsl +90 -0
- package/transitions/Merger.glsl +69 -0
- package/transitions/Minesweeper.glsl +133 -0
- package/transitions/MotionDrift.glsl +50 -0
- package/transitions/Multitude.glsl +64 -0
- package/transitions/NailPolish.glsl +70 -0
- package/transitions/PaintDissolve.glsl +19 -12
- package/transitions/Photocopy.glsl +64 -0
- package/transitions/Physarum.glsl +105 -0
- package/transitions/Pound.glsl +63 -0
- package/transitions/Primitives.glsl +70 -0
- package/transitions/ProgressiveLoad.glsl +44 -0
- package/transitions/Quicksilver.glsl +110 -0
- package/transitions/Rebound.glsl +83 -0
- package/transitions/Recast.glsl +48 -0
- package/transitions/Resurface.glsl +58 -0
- package/transitions/RoughToFine.glsl +86 -0
- package/transitions/SandThrough.glsl +53 -0
- package/transitions/ShadowPlay.glsl +45 -0
- package/transitions/Shatter.glsl +55 -35
- package/transitions/Shoal.glsl +131 -0
- package/transitions/Simmer.glsl +142 -0
- package/transitions/SkiTracks.glsl +96 -0
- package/transitions/SlidingGrid.glsl +119 -0
- package/transitions/Slipstream.glsl +151 -0
- package/transitions/Somersault.glsl +85 -0
- package/transitions/Sparkler.glsl +80 -0
- package/transitions/SpectralTrails.glsl +68 -0
- package/transitions/Spectrum.glsl +64 -0
- package/transitions/StarTrails.glsl +123 -0
- package/transitions/Streamgraph.glsl +64 -0
- package/transitions/SunDisc.glsl +160 -0
- package/transitions/Supergraphic.glsl +146 -0
- package/transitions/Swell.glsl +112 -0
- package/transitions/ThreeInks.glsl +130 -0
- package/transitions/TidalBands.glsl +135 -0
- package/transitions/TigerEye.glsl +64 -0
- package/transitions/TileBlast.glsl +25 -9
- package/transitions/TileShuffle.glsl +48 -35
- package/transitions/Tinsel.glsl +48 -0
- package/transitions/Toggles.glsl +62 -0
- package/transitions/TonalHills.glsl +161 -0
- package/transitions/ToneBurst.glsl +111 -0
- package/transitions/Torsion.glsl +36 -0
- package/transitions/Treemap.glsl +79 -0
- package/transitions/TripleMatch.glsl +98 -0
- package/transitions/TwinDragons.glsl +50 -0
- package/transitions/Undercover.glsl +75 -0
- package/transitions/Undulate.glsl +53 -0
- package/transitions/Venn.glsl +47 -0
- package/transitions/WaterWindow.glsl +88 -0
- package/transitions/Whirl.glsl +72 -0
- package/transitions/Wrench.glsl +22 -10
- package/transitions/XorSquares.glsl +49 -0
- package/wgsl/AccretionDisk.wgsl +758 -0
- package/wgsl/AirShow.wgsl +482 -0
- package/wgsl/Alike.wgsl +926 -0
- package/wgsl/Anaglyph.wgsl +134 -0
- package/wgsl/Anodize.wgsl +139 -0
- package/wgsl/Atom.wgsl +288 -0
- package/wgsl/BadBytes.wgsl +273 -0
- package/wgsl/BentRays.wgsl +202 -0
- package/wgsl/BlackLight.wgsl +237 -0
- package/wgsl/Bleach.wgsl +428 -0
- package/wgsl/Blueprint.wgsl +300 -0
- package/wgsl/BowTie.wgsl +152 -110
- package/wgsl/BoxClose.wgsl +345 -0
- package/wgsl/Braid.wgsl +652 -0
- package/wgsl/Buffering.wgsl +191 -0
- package/wgsl/Bullseyes.wgsl +366 -0
- package/wgsl/Captcha.wgsl +275 -0
- package/wgsl/CardStunt.wgsl +246 -0
- package/wgsl/Centrifuge.wgsl +442 -0
- package/wgsl/Champagne.wgsl +568 -0
- package/wgsl/Choppy.wgsl +315 -0
- package/wgsl/Chrysanthemum.wgsl +317 -0
- package/wgsl/CloudBanks.wgsl +773 -0
- package/wgsl/Coalesce.wgsl +424 -0
- package/wgsl/ColorFields.wgsl +149 -0
- package/wgsl/ColorPowder.wgsl +289 -0
- package/wgsl/CrossProcess.wgsl +132 -0
- package/wgsl/CryoJets.wgsl +413 -0
- package/wgsl/Curdle.wgsl +209 -0
- package/wgsl/DarkAdapt.wgsl +163 -0
- package/wgsl/Denoise.wgsl +205 -0
- package/wgsl/Dunk.wgsl +323 -0
- package/wgsl/EmptySlot.wgsl +550 -0
- package/wgsl/EuclidSquares.wgsl +421 -0
- package/wgsl/Filament.wgsl +150 -0
- package/wgsl/FilmBurn.wgsl +300 -258
- package/wgsl/FiveTriangles.wgsl +523 -0
- package/wgsl/FlowDissolve.wgsl +415 -251
- package/wgsl/FoilBalloon.wgsl +579 -0
- package/wgsl/FoldedInk.wgsl +772 -0
- package/wgsl/ForceField.wgsl +434 -0
- package/wgsl/FullHouse.wgsl +337 -0
- package/wgsl/GalacticYear.wgsl +331 -0
- package/wgsl/Gliders.wgsl +374 -0
- package/wgsl/GoldenAngle.wgsl +416 -0
- package/wgsl/GoldenHour.wgsl +202 -0
- package/wgsl/Grisaille.wgsl +341 -0
- package/wgsl/HandPlane.wgsl +332 -0
- package/wgsl/HandPrints.wgsl +476 -0
- package/wgsl/Headlong.wgsl +501 -0
- package/wgsl/Highlighter.wgsl +296 -0
- package/wgsl/HoneycombFill.wgsl +295 -0
- package/wgsl/HueDepth.wgsl +379 -0
- package/wgsl/IceFerns.wgsl +383 -0
- package/wgsl/ImpactFrames.wgsl +560 -0
- package/wgsl/JacquardWeave.wgsl +400 -0
- package/wgsl/JetStreams.wgsl +371 -0
- package/wgsl/KickSnare.wgsl +298 -0
- package/wgsl/Ladle.wgsl +218 -0
- package/wgsl/Lichen.wgsl +379 -0
- package/wgsl/Linkup.wgsl +1243 -0
- package/wgsl/Luminol.wgsl +270 -0
- package/wgsl/MeltedCrayons.wgsl +386 -0
- package/wgsl/Merger.wgsl +324 -0
- package/wgsl/Minesweeper.wgsl +605 -0
- package/wgsl/MotionDrift.wgsl +222 -0
- package/wgsl/Multitude.wgsl +315 -0
- package/wgsl/NailPolish.wgsl +341 -0
- package/wgsl/PaintDissolve.wgsl +850 -759
- package/wgsl/Photocopy.wgsl +304 -0
- package/wgsl/Physarum.wgsl +427 -0
- package/wgsl/Pound.wgsl +242 -0
- package/wgsl/Primitives.wgsl +391 -0
- package/wgsl/ProgressiveLoad.wgsl +228 -0
- package/wgsl/Quicksilver.wgsl +457 -0
- package/wgsl/Rebound.wgsl +389 -0
- package/wgsl/Recast.wgsl +191 -0
- package/wgsl/Resurface.wgsl +282 -0
- package/wgsl/RoughToFine.wgsl +389 -0
- package/wgsl/SandThrough.wgsl +250 -0
- package/wgsl/ShadowPlay.wgsl +209 -0
- package/wgsl/Shatter.wgsl +893 -792
- package/wgsl/Shoal.wgsl +563 -0
- package/wgsl/Simmer.wgsl +633 -0
- package/wgsl/SkiTracks.wgsl +447 -0
- package/wgsl/SlidingGrid.wgsl +532 -0
- package/wgsl/Slipstream.wgsl +774 -0
- package/wgsl/Somersault.wgsl +448 -0
- package/wgsl/Sparkler.wgsl +305 -0
- package/wgsl/SpectralTrails.wgsl +256 -0
- package/wgsl/Spectrum.wgsl +257 -0
- package/wgsl/StarTrails.wgsl +508 -0
- package/wgsl/Streamgraph.wgsl +327 -0
- package/wgsl/SunDisc.wgsl +776 -0
- package/wgsl/Supergraphic.wgsl +734 -0
- package/wgsl/Swell.wgsl +472 -0
- package/wgsl/ThreeInks.wgsl +572 -0
- package/wgsl/TidalBands.wgsl +648 -0
- package/wgsl/TigerEye.wgsl +325 -0
- package/wgsl/TileBlast.wgsl +727 -602
- package/wgsl/TileShuffle.wgsl +817 -789
- package/wgsl/Tinsel.wgsl +214 -0
- package/wgsl/Toggles.wgsl +292 -0
- package/wgsl/TonalHills.wgsl +788 -0
- package/wgsl/ToneBurst.wgsl +454 -0
- package/wgsl/Torsion.wgsl +161 -0
- package/wgsl/Treemap.wgsl +348 -0
- package/wgsl/TripleMatch.wgsl +377 -0
- package/wgsl/TwinDragons.wgsl +238 -0
- package/wgsl/Undercover.wgsl +384 -0
- package/wgsl/Undulate.wgsl +263 -0
- package/wgsl/Venn.wgsl +190 -0
- package/wgsl/WaterWindow.wgsl +378 -0
- package/wgsl/Whirl.wgsl +275 -0
- package/wgsl/Wrench.wgsl +798 -730
- package/wgsl/XorSquares.wgsl +232 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
// KickSnare — MSL, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/KickSnare.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: The change lands on two beats: the first punch swaps only the light and color masses, so the outgoing picture's details stand drawn over the incoming one's blurred colors; the second snaps the details over too
|
|
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
|
+
float punch;
|
|
17
|
+
float spread;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
metal::float4 getToColor(
|
|
21
|
+
thread metal::float2& uv,
|
|
22
|
+
metal::sampler _sampler,
|
|
23
|
+
metal::texture2d<float, metal::access::sample> _to
|
|
24
|
+
) {
|
|
25
|
+
float _e44 = uv[0u];
|
|
26
|
+
float _e46 = uv[1u];
|
|
27
|
+
metal::float4 _e49 = _to.sample(_sampler, metal::float2(_e44, 1.0 - _e46), metal::level(0.0));
|
|
28
|
+
return _e49;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
metal::float4 pm(
|
|
32
|
+
thread metal::float4& c
|
|
33
|
+
) {
|
|
34
|
+
metal::float4 _e43 = c;
|
|
35
|
+
float _e46 = c[3u];
|
|
36
|
+
metal::float3 _e47 = _e43.xyz * _e46;
|
|
37
|
+
float _e49 = c[3u];
|
|
38
|
+
return metal::float4(_e47.x, _e47.y, _e47.z, _e49);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
metal::float4 getFromColor(
|
|
42
|
+
thread metal::float2& uv_1,
|
|
43
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
44
|
+
metal::sampler _sampler
|
|
45
|
+
) {
|
|
46
|
+
float _e44 = uv_1[0u];
|
|
47
|
+
float _e46 = uv_1[1u];
|
|
48
|
+
metal::float4 _e49 = _from.sample(_sampler, metal::float2(_e44, 1.0 - _e46), metal::level(0.0));
|
|
49
|
+
return _e49;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
metal::float2 mirror(
|
|
53
|
+
thread metal::float2& v
|
|
54
|
+
) {
|
|
55
|
+
metal::float2 _e43 = v;
|
|
56
|
+
metal::float2 _e44 = metal::float2(2.0);
|
|
57
|
+
return metal::float2(1.0) - metal::abs(metal::float2(1.0) - (_e43 - (metal::floor(_e43 / _e44) * _e44)));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
float beat(
|
|
61
|
+
thread float& t
|
|
62
|
+
) {
|
|
63
|
+
float local = {};
|
|
64
|
+
float _e44 = t;
|
|
65
|
+
if (_e44 < 0.0) {
|
|
66
|
+
local = 0.0;
|
|
67
|
+
} else {
|
|
68
|
+
float _e46 = t;
|
|
69
|
+
float _e48 = t;
|
|
70
|
+
local = (_e46 * 22.2) * metal::exp(1.0 - (_e48 * 22.0));
|
|
71
|
+
}
|
|
72
|
+
float _e53 = local;
|
|
73
|
+
return _e53;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
metal::float4 transition(
|
|
77
|
+
thread metal::float2& uv_2,
|
|
78
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
79
|
+
metal::sampler _sampler,
|
|
80
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
81
|
+
constant Uniforms& uniforms
|
|
82
|
+
) {
|
|
83
|
+
metal::float2 p = {};
|
|
84
|
+
float low = {};
|
|
85
|
+
float high = {};
|
|
86
|
+
float kick = {};
|
|
87
|
+
float param = {};
|
|
88
|
+
float snare = {};
|
|
89
|
+
float param_1 = {};
|
|
90
|
+
float split = {};
|
|
91
|
+
metal::float2 pl = {};
|
|
92
|
+
metal::float2 ph = {};
|
|
93
|
+
metal::float2 r = {};
|
|
94
|
+
float jit = {};
|
|
95
|
+
float gain = {};
|
|
96
|
+
metal::float4 base = {};
|
|
97
|
+
int i = {};
|
|
98
|
+
float f = {};
|
|
99
|
+
float a = {};
|
|
100
|
+
metal::float2 d = {};
|
|
101
|
+
float turn = {};
|
|
102
|
+
float l = {};
|
|
103
|
+
float h = {};
|
|
104
|
+
metal::float2 param_2 = {};
|
|
105
|
+
metal::float2 param_3 = {};
|
|
106
|
+
metal::float4 param_4 = {};
|
|
107
|
+
metal::float2 param_5 = {};
|
|
108
|
+
metal::float2 param_6 = {};
|
|
109
|
+
metal::float4 param_7 = {};
|
|
110
|
+
metal::float2 param_8 = {};
|
|
111
|
+
metal::float2 param_9 = {};
|
|
112
|
+
metal::float4 param_10 = {};
|
|
113
|
+
metal::float2 param_11 = {};
|
|
114
|
+
metal::float2 param_12 = {};
|
|
115
|
+
metal::float4 param_13 = {};
|
|
116
|
+
metal::float2 param_14 = {};
|
|
117
|
+
metal::float2 param_15 = {};
|
|
118
|
+
metal::float4 param_16 = {};
|
|
119
|
+
metal::float2 param_17 = {};
|
|
120
|
+
metal::float2 param_18 = {};
|
|
121
|
+
metal::float4 param_19 = {};
|
|
122
|
+
metal::float4 local_1 = {};
|
|
123
|
+
metal::float2 _e83 = uv_2;
|
|
124
|
+
p = _e83 - metal::float2(0.5);
|
|
125
|
+
float _e87 = uniforms.progress;
|
|
126
|
+
low = metal::smoothstep(0.2, 0.28, _e87);
|
|
127
|
+
float _e90 = uniforms.progress;
|
|
128
|
+
high = metal::smoothstep(0.6, 0.68, _e90);
|
|
129
|
+
float _e93 = uniforms.progress;
|
|
130
|
+
param = _e93 - 0.2;
|
|
131
|
+
float _e95 = beat(param);
|
|
132
|
+
kick = _e95;
|
|
133
|
+
float _e97 = uniforms.progress;
|
|
134
|
+
param_1 = _e97 - 0.6;
|
|
135
|
+
float _e99 = beat(param_1);
|
|
136
|
+
float _e101 = uniforms.progress;
|
|
137
|
+
snare = _e99 * (1.0 - metal::smoothstep(0.8, 1.0, _e101));
|
|
138
|
+
float _e106 = uniforms.progress;
|
|
139
|
+
float _e109 = uniforms.progress;
|
|
140
|
+
split = metal::smoothstep(0.02, 0.24, _e106) * (1.0 - metal::smoothstep(0.6, 0.95, _e109));
|
|
141
|
+
metal::float2 _e113 = p;
|
|
142
|
+
float _e115 = uniforms.punch;
|
|
143
|
+
float _e116 = kick;
|
|
144
|
+
pl = (_e113 * (1.0 - (_e115 * _e116))) + metal::float2(0.5);
|
|
145
|
+
metal::float2 _e122 = p;
|
|
146
|
+
float _e123 = split;
|
|
147
|
+
float _e127 = uniforms.punch;
|
|
148
|
+
float _e128 = snare;
|
|
149
|
+
ph = (_e122 * ((1.0 - (0.1 * _e123)) - (_e127 * _e128))) + metal::float2(0.5);
|
|
150
|
+
float _e135 = uniforms.spread;
|
|
151
|
+
float _e136 = split;
|
|
152
|
+
float _e139 = uniforms.ratio;
|
|
153
|
+
r = metal::float2(_e135 * _e136) / metal::float2(_e139, 1.0);
|
|
154
|
+
metal::float2 _e143 = uv_2;
|
|
155
|
+
float _e145 = uniforms.ratio;
|
|
156
|
+
jit = metal::fract(52.982918 * metal::fract(metal::dot(metal::floor(((_e143 * metal::float2(_e145, 1.0)) * 1080.0) + metal::float2(0.283)), metal::float2(0.06711056, 0.00583715))));
|
|
157
|
+
float _e156 = split;
|
|
158
|
+
gain = 1.0 + (0.6 * _e156);
|
|
159
|
+
base = metal::float4(0.0, 0.0, 0.0, 0.0);
|
|
160
|
+
i = 0;
|
|
161
|
+
uint2 loop_bound = uint2(4294967295u);
|
|
162
|
+
bool loop_init = true;
|
|
163
|
+
while(true) {
|
|
164
|
+
if (metal::all(loop_bound == uint2(0u))) { break; }
|
|
165
|
+
loop_bound -= uint2(loop_bound.y == 0u, 1u);
|
|
166
|
+
if (!loop_init) {
|
|
167
|
+
int _e251 = i;
|
|
168
|
+
i = as_type<int>(as_type<uint>(_e251) + as_type<uint>(1));
|
|
169
|
+
}
|
|
170
|
+
loop_init = false;
|
|
171
|
+
int _e159 = i;
|
|
172
|
+
if (_e159 < 14) {
|
|
173
|
+
int _e161 = i;
|
|
174
|
+
f = static_cast<float>(_e161);
|
|
175
|
+
float _e163 = f;
|
|
176
|
+
float _e165 = jit;
|
|
177
|
+
a = (_e163 * 2.4) + (0.9 * _e165);
|
|
178
|
+
float _e168 = f;
|
|
179
|
+
float _e169 = jit;
|
|
180
|
+
float _e173 = a;
|
|
181
|
+
float _e175 = a;
|
|
182
|
+
metal::float2 _e179 = r;
|
|
183
|
+
d = (metal::float2(metal::cos(_e173), metal::sin(_e175)) * metal::sqrt((_e168 + _e169) / 14.0)) * _e179;
|
|
184
|
+
float _e181 = f;
|
|
185
|
+
float _e182 = _e181 * 5.0;
|
|
186
|
+
turn = _e182 - (metal::floor(_e182 / 14.0) * 14.0);
|
|
187
|
+
float _e187 = low;
|
|
188
|
+
float _e189 = turn;
|
|
189
|
+
l = metal::clamp((_e187 * 14.0) - _e189, 0.0, 1.0);
|
|
190
|
+
float _e192 = high;
|
|
191
|
+
float _e194 = turn;
|
|
192
|
+
float _e197 = gain;
|
|
193
|
+
h = metal::clamp((_e192 * 14.0) - _e194, 0.0, 1.0) * _e197;
|
|
194
|
+
float _e199 = l;
|
|
195
|
+
if (_e199 < 1.0) {
|
|
196
|
+
float _e201 = l;
|
|
197
|
+
metal::float2 _e203 = pl;
|
|
198
|
+
metal::float2 _e204 = d;
|
|
199
|
+
param_2 = _e203 + _e204;
|
|
200
|
+
metal::float2 _e206 = mirror(param_2);
|
|
201
|
+
param_3 = _e206;
|
|
202
|
+
metal::float4 _e207 = getFromColor(param_3, _from, _sampler);
|
|
203
|
+
param_4 = _e207;
|
|
204
|
+
metal::float4 _e208 = pm(param_4);
|
|
205
|
+
metal::float4 _e210 = base;
|
|
206
|
+
base = _e210 + (_e208 * (1.0 - _e201));
|
|
207
|
+
}
|
|
208
|
+
float _e212 = l;
|
|
209
|
+
if (_e212 > 0.0) {
|
|
210
|
+
float _e214 = l;
|
|
211
|
+
metal::float2 _e215 = pl;
|
|
212
|
+
metal::float2 _e216 = d;
|
|
213
|
+
param_5 = _e215 + _e216;
|
|
214
|
+
metal::float2 _e218 = mirror(param_5);
|
|
215
|
+
param_6 = _e218;
|
|
216
|
+
metal::float4 _e219 = getToColor(param_6, _sampler, _to);
|
|
217
|
+
param_7 = _e219;
|
|
218
|
+
metal::float4 _e220 = pm(param_7);
|
|
219
|
+
metal::float4 _e222 = base;
|
|
220
|
+
base = _e222 + (_e220 * _e214);
|
|
221
|
+
}
|
|
222
|
+
float _e224 = h;
|
|
223
|
+
float _e225 = gain;
|
|
224
|
+
if (_e224 < _e225) {
|
|
225
|
+
float _e227 = gain;
|
|
226
|
+
float _e228 = h;
|
|
227
|
+
metal::float2 _e230 = ph;
|
|
228
|
+
metal::float2 _e231 = d;
|
|
229
|
+
param_8 = _e230 + _e231;
|
|
230
|
+
metal::float2 _e233 = mirror(param_8);
|
|
231
|
+
param_9 = _e233;
|
|
232
|
+
metal::float4 _e234 = getFromColor(param_9, _from, _sampler);
|
|
233
|
+
param_10 = _e234;
|
|
234
|
+
metal::float4 _e235 = pm(param_10);
|
|
235
|
+
metal::float4 _e237 = base;
|
|
236
|
+
base = _e237 - (_e235 * (_e227 - _e228));
|
|
237
|
+
}
|
|
238
|
+
float _e239 = h;
|
|
239
|
+
if (_e239 > 0.0) {
|
|
240
|
+
float _e241 = h;
|
|
241
|
+
metal::float2 _e242 = ph;
|
|
242
|
+
metal::float2 _e243 = d;
|
|
243
|
+
param_11 = _e242 + _e243;
|
|
244
|
+
metal::float2 _e245 = mirror(param_11);
|
|
245
|
+
param_12 = _e245;
|
|
246
|
+
metal::float4 _e246 = getToColor(param_12, _sampler, _to);
|
|
247
|
+
param_13 = _e246;
|
|
248
|
+
metal::float4 _e247 = pm(param_13);
|
|
249
|
+
metal::float4 _e249 = base;
|
|
250
|
+
base = _e249 - (_e247 * _e241);
|
|
251
|
+
}
|
|
252
|
+
continue;
|
|
253
|
+
} else {
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
metal::float4 _e253 = base;
|
|
258
|
+
base = _e253 / metal::float4(14.0);
|
|
259
|
+
float _e256 = gain;
|
|
260
|
+
metal::float2 _e257 = ph;
|
|
261
|
+
param_14 = _e257;
|
|
262
|
+
metal::float2 _e258 = mirror(param_14);
|
|
263
|
+
param_15 = _e258;
|
|
264
|
+
metal::float4 _e259 = getFromColor(param_15, _from, _sampler);
|
|
265
|
+
param_16 = _e259;
|
|
266
|
+
metal::float4 _e260 = pm(param_16);
|
|
267
|
+
metal::float2 _e261 = ph;
|
|
268
|
+
param_17 = _e261;
|
|
269
|
+
metal::float2 _e262 = mirror(param_17);
|
|
270
|
+
param_18 = _e262;
|
|
271
|
+
metal::float4 _e263 = getToColor(param_18, _sampler, _to);
|
|
272
|
+
param_19 = _e263;
|
|
273
|
+
metal::float4 _e264 = pm(param_19);
|
|
274
|
+
float _e265 = high;
|
|
275
|
+
metal::float4 _e269 = base;
|
|
276
|
+
base = _e269 + (metal::mix(_e260, _e264, metal::float4(_e265)) * _e256);
|
|
277
|
+
float _e271 = kick;
|
|
278
|
+
float _e272 = snare;
|
|
279
|
+
metal::float4 _e276 = base;
|
|
280
|
+
metal::float3 _e278 = _e276.xyz * (1.0 + (0.3 * (_e271 + _e272)));
|
|
281
|
+
base[0u] = _e278.x;
|
|
282
|
+
base[1u] = _e278.y;
|
|
283
|
+
base[2u] = _e278.z;
|
|
284
|
+
metal::float4 _e285 = base;
|
|
285
|
+
base = metal::clamp(_e285, metal::float4(0.0), metal::float4(1.0));
|
|
286
|
+
float _e290 = base[3u];
|
|
287
|
+
if (_e290 > 0.0) {
|
|
288
|
+
metal::float4 _e292 = base;
|
|
289
|
+
float _e295 = base[3u];
|
|
290
|
+
metal::float3 _e299 = metal::min(_e292.xyz / metal::float3(_e295), metal::float3(1.0));
|
|
291
|
+
float _e301 = base[3u];
|
|
292
|
+
local_1 = metal::float4(_e299.x, _e299.y, _e299.z, _e301);
|
|
293
|
+
} else {
|
|
294
|
+
local_1 = metal::float4(0.0, 0.0, 0.0, 0.0);
|
|
295
|
+
}
|
|
296
|
+
metal::float4 _e306 = local_1;
|
|
297
|
+
return _e306;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
void main_1(
|
|
301
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
302
|
+
metal::sampler _sampler,
|
|
303
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
304
|
+
constant Uniforms& uniforms,
|
|
305
|
+
thread metal::float4& _fragColor,
|
|
306
|
+
thread metal::float2& _uv_1
|
|
307
|
+
) {
|
|
308
|
+
metal::float2 param_20 = {};
|
|
309
|
+
metal::float2 _e43 = _uv_1;
|
|
310
|
+
param_20 = _e43;
|
|
311
|
+
metal::float4 _e44 = transition(param_20, _from, _sampler, _to, uniforms);
|
|
312
|
+
_fragColor = _e44;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
struct main_Input {
|
|
317
|
+
metal::float2 _uv [[user(loc0), center_perspective]];
|
|
318
|
+
};
|
|
319
|
+
struct main_Output {
|
|
320
|
+
metal::float4 member [[color(0)]];
|
|
321
|
+
};
|
|
322
|
+
fragment main_Output main_(
|
|
323
|
+
main_Input varyings [[stage_in]]
|
|
324
|
+
, metal::texture2d<float, metal::access::sample> _from [[texture(0)]]
|
|
325
|
+
, metal::sampler _sampler [[sampler(0)]]
|
|
326
|
+
, metal::texture2d<float, metal::access::sample> _to [[texture(1)]]
|
|
327
|
+
, constant Uniforms& uniforms [[buffer(0)]]
|
|
328
|
+
) {
|
|
329
|
+
metal::float4 _fragColor = {};
|
|
330
|
+
metal::float2 _uv_1 = {};
|
|
331
|
+
const auto _uv = varyings._uv;
|
|
332
|
+
_uv_1 = _uv;
|
|
333
|
+
main_1(_from, _sampler, _to, uniforms, _fragColor, _uv_1);
|
|
334
|
+
metal::float4 _e3 = _fragColor;
|
|
335
|
+
return main_Output { _e3 };
|
|
336
|
+
}
|
package/msl/Ladle.metal
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
// Ladle — MSL, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/Ladle.glsl
|
|
2
|
+
// Author: gre
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: Ladleful after ladleful of the incoming picture is poured into the outgoing one; each pour spreads as a round pool that shoves everything around it aside, squeezing the outgoing picture and the earlier pools into thin veins, until a last big pour pushes the rest out of the frame
|
|
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
|
+
float pours;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
metal::float4 getFromColor(
|
|
20
|
+
thread metal::float2& uv,
|
|
21
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
22
|
+
metal::sampler _sampler
|
|
23
|
+
) {
|
|
24
|
+
float _e42 = uv[0u];
|
|
25
|
+
float _e44 = uv[1u];
|
|
26
|
+
metal::float4 _e47 = _from.sample(_sampler, metal::float2(_e42, 1.0 - _e44), metal::level(0.0));
|
|
27
|
+
return _e47;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
metal::float4 getToColor(
|
|
31
|
+
thread metal::float2& uv_1,
|
|
32
|
+
metal::sampler _sampler,
|
|
33
|
+
metal::texture2d<float, metal::access::sample> _to
|
|
34
|
+
) {
|
|
35
|
+
float _e42 = uv_1[0u];
|
|
36
|
+
float _e44 = uv_1[1u];
|
|
37
|
+
metal::float4 _e47 = _to.sample(_sampler, metal::float2(_e42, 1.0 - _e44), metal::level(0.0));
|
|
38
|
+
return _e47;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
float hash11(
|
|
42
|
+
thread float& p
|
|
43
|
+
) {
|
|
44
|
+
float _e41 = p;
|
|
45
|
+
p = metal::fract(_e41 * 0.1031);
|
|
46
|
+
float _e44 = p;
|
|
47
|
+
float _e46 = p;
|
|
48
|
+
p = _e46 * (_e44 + 33.33);
|
|
49
|
+
float _e48 = p;
|
|
50
|
+
float _e49 = p;
|
|
51
|
+
float _e51 = p;
|
|
52
|
+
p = _e51 * (_e48 + _e49);
|
|
53
|
+
float _e53 = p;
|
|
54
|
+
return metal::fract(_e53);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
metal::float4 transition(
|
|
58
|
+
thread metal::float2& uv_2,
|
|
59
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
60
|
+
metal::sampler _sampler,
|
|
61
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
62
|
+
constant Uniforms& uniforms
|
|
63
|
+
) {
|
|
64
|
+
metal::float2 p_1 = {};
|
|
65
|
+
float n = {};
|
|
66
|
+
metal::float4 acc = {};
|
|
67
|
+
float T = {};
|
|
68
|
+
int i = {};
|
|
69
|
+
float k = {};
|
|
70
|
+
bool last = {};
|
|
71
|
+
float t0_ = {};
|
|
72
|
+
float s = {};
|
|
73
|
+
float local = {};
|
|
74
|
+
float local_1 = {};
|
|
75
|
+
metal::float2 c = {};
|
|
76
|
+
float param = {};
|
|
77
|
+
metal::float2 far = {};
|
|
78
|
+
float rmax = {};
|
|
79
|
+
float local_2 = {};
|
|
80
|
+
float param_1 = {};
|
|
81
|
+
float r = {};
|
|
82
|
+
metal::float2 d = {};
|
|
83
|
+
float l = {};
|
|
84
|
+
float a = {};
|
|
85
|
+
metal::float2 param_2 = {};
|
|
86
|
+
metal::float2 param_3 = {};
|
|
87
|
+
float _e65 = uv_2[0u];
|
|
88
|
+
float _e67 = uniforms.ratio;
|
|
89
|
+
float _e70 = uv_2[1u];
|
|
90
|
+
p_1 = metal::float2(_e65 * _e67, _e70);
|
|
91
|
+
float _e73 = uniforms.pours;
|
|
92
|
+
n = metal::clamp(metal::floor(_e73), 1.0, 9.0);
|
|
93
|
+
acc = metal::float4(0.0, 0.0, 0.0, 0.0);
|
|
94
|
+
T = 1.0;
|
|
95
|
+
i = 0;
|
|
96
|
+
uint2 loop_bound = uint2(4294967295u);
|
|
97
|
+
bool loop_init = true;
|
|
98
|
+
while(true) {
|
|
99
|
+
if (metal::all(loop_bound == uint2(0u))) { break; }
|
|
100
|
+
loop_bound -= uint2(loop_bound.y == 0u, 1u);
|
|
101
|
+
if (!loop_init) {
|
|
102
|
+
int _e215 = i;
|
|
103
|
+
i = as_type<int>(as_type<uint>(_e215) + as_type<uint>(1));
|
|
104
|
+
}
|
|
105
|
+
loop_init = false;
|
|
106
|
+
int _e76 = i;
|
|
107
|
+
if (_e76 < 9) {
|
|
108
|
+
int _e78 = i;
|
|
109
|
+
k = static_cast<float>(as_type<int>(as_type<uint>(8) - as_type<uint>(_e78)));
|
|
110
|
+
float _e81 = k;
|
|
111
|
+
float _e82 = n;
|
|
112
|
+
if (_e81 < _e82) {
|
|
113
|
+
float _e84 = k;
|
|
114
|
+
float _e85 = n;
|
|
115
|
+
last = _e84 == (_e85 - 1.0);
|
|
116
|
+
float _e88 = k;
|
|
117
|
+
float _e90 = n;
|
|
118
|
+
t0_ = (0.72 * _e88) / _e90;
|
|
119
|
+
float _e93 = uniforms.progress;
|
|
120
|
+
float _e94 = t0_;
|
|
121
|
+
bool _e96 = last;
|
|
122
|
+
if (_e96) {
|
|
123
|
+
float _e97 = t0_;
|
|
124
|
+
local = 1.0 - _e97;
|
|
125
|
+
} else {
|
|
126
|
+
local = 0.3;
|
|
127
|
+
}
|
|
128
|
+
float _e99 = local;
|
|
129
|
+
s = metal::clamp((_e93 - _e94) / _e99, 0.0, 1.0);
|
|
130
|
+
bool _e102 = last;
|
|
131
|
+
if (_e102) {
|
|
132
|
+
float _e103 = s;
|
|
133
|
+
float _e104 = s;
|
|
134
|
+
float _e106 = s;
|
|
135
|
+
local_1 = (_e103 * _e104) * (3.0 - (2.0 * _e106));
|
|
136
|
+
} else {
|
|
137
|
+
float _e110 = s;
|
|
138
|
+
float _e112 = s;
|
|
139
|
+
float _e115 = s;
|
|
140
|
+
local_1 = 1.0 - (((1.0 - _e110) * (1.0 - _e112)) * (1.0 - _e115));
|
|
141
|
+
}
|
|
142
|
+
float _e119 = local_1;
|
|
143
|
+
s = _e119;
|
|
144
|
+
float _e120 = k;
|
|
145
|
+
float _e127 = uniforms.ratio;
|
|
146
|
+
float _e129 = k;
|
|
147
|
+
float _e132 = k;
|
|
148
|
+
param = _e132 + 3.0;
|
|
149
|
+
float _e134 = hash11(param);
|
|
150
|
+
c = metal::float2((0.15 + (0.7 * metal::fract(0.31 + (_e120 * 0.618)))) * _e127, 0.18 + (0.64 * metal::fract((0.77 + (_e129 * 0.4142)) + (0.2 * _e134))));
|
|
151
|
+
metal::float2 _e141 = c;
|
|
152
|
+
float _e143 = uniforms.ratio;
|
|
153
|
+
metal::float2 _e145 = c;
|
|
154
|
+
far = metal::max(_e141, metal::float2(_e143, 1.0) - _e145);
|
|
155
|
+
bool _e148 = last;
|
|
156
|
+
if (_e148) {
|
|
157
|
+
metal::float2 _e149 = far;
|
|
158
|
+
local_2 = metal::length(_e149) * 1.08;
|
|
159
|
+
} else {
|
|
160
|
+
float _e152 = k;
|
|
161
|
+
param_1 = (_e152 * 5.7) + 2.0;
|
|
162
|
+
float _e155 = hash11(param_1);
|
|
163
|
+
float _e158 = k;
|
|
164
|
+
float _e160 = n;
|
|
165
|
+
local_2 = (0.13 + (0.1 * _e155)) + ((0.12 * _e158) / _e160);
|
|
166
|
+
}
|
|
167
|
+
float _e163 = local_2;
|
|
168
|
+
rmax = _e163;
|
|
169
|
+
float _e164 = rmax;
|
|
170
|
+
float _e165 = s;
|
|
171
|
+
r = _e164 * _e165;
|
|
172
|
+
metal::float2 _e167 = p_1;
|
|
173
|
+
metal::float2 _e168 = c;
|
|
174
|
+
d = _e167 - _e168;
|
|
175
|
+
metal::float2 _e170 = d;
|
|
176
|
+
l = metal::length(_e170);
|
|
177
|
+
float _e172 = r;
|
|
178
|
+
float _e174 = r;
|
|
179
|
+
float _e175 = l;
|
|
180
|
+
float _e178 = r;
|
|
181
|
+
a = (1.0 - metal::smoothstep(_e172 - 0.004, _e174, _e175)) * metal::step(0.0005, _e178);
|
|
182
|
+
float _e181 = T;
|
|
183
|
+
float _e182 = a;
|
|
184
|
+
float _e185 = p_1[0u];
|
|
185
|
+
float _e187 = uniforms.ratio;
|
|
186
|
+
float _e190 = p_1[1u];
|
|
187
|
+
param_2 = metal::float2(_e185 / _e187, _e190);
|
|
188
|
+
metal::float4 _e192 = getToColor(param_2, _sampler, _to);
|
|
189
|
+
metal::float4 _e194 = acc;
|
|
190
|
+
acc = _e194 + (_e192 * (_e181 * _e182));
|
|
191
|
+
float _e196 = a;
|
|
192
|
+
float _e198 = T;
|
|
193
|
+
T = _e198 * (1.0 - _e196);
|
|
194
|
+
metal::float2 _e200 = c;
|
|
195
|
+
metal::float2 _e201 = d;
|
|
196
|
+
float _e202 = r;
|
|
197
|
+
float _e203 = r;
|
|
198
|
+
float _e205 = l;
|
|
199
|
+
float _e206 = l;
|
|
200
|
+
p_1 = _e200 + (_e201 * metal::sqrt(metal::max(0.0, 1.0 - ((_e202 * _e203) / metal::max(_e205 * _e206, 0.000001)))));
|
|
201
|
+
}
|
|
202
|
+
continue;
|
|
203
|
+
} else {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
metal::float4 _e217 = acc;
|
|
208
|
+
float _e218 = T;
|
|
209
|
+
float _e220 = p_1[0u];
|
|
210
|
+
float _e222 = uniforms.ratio;
|
|
211
|
+
float _e225 = p_1[1u];
|
|
212
|
+
param_3 = metal::float2(_e220 / _e222, _e225);
|
|
213
|
+
metal::float4 _e227 = getFromColor(param_3, _from, _sampler);
|
|
214
|
+
return _e217 + (_e227 * _e218);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
void main_1(
|
|
218
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
219
|
+
metal::sampler _sampler,
|
|
220
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
221
|
+
constant Uniforms& uniforms,
|
|
222
|
+
thread metal::float4& _fragColor,
|
|
223
|
+
thread metal::float2& _uv_1
|
|
224
|
+
) {
|
|
225
|
+
metal::float2 param_4 = {};
|
|
226
|
+
metal::float2 _e41 = _uv_1;
|
|
227
|
+
param_4 = _e41;
|
|
228
|
+
metal::float4 _e42 = transition(param_4, _from, _sampler, _to, uniforms);
|
|
229
|
+
_fragColor = _e42;
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
struct main_Input {
|
|
234
|
+
metal::float2 _uv [[user(loc0), center_perspective]];
|
|
235
|
+
};
|
|
236
|
+
struct main_Output {
|
|
237
|
+
metal::float4 member [[color(0)]];
|
|
238
|
+
};
|
|
239
|
+
fragment main_Output main_(
|
|
240
|
+
main_Input varyings [[stage_in]]
|
|
241
|
+
, metal::texture2d<float, metal::access::sample> _from [[texture(0)]]
|
|
242
|
+
, metal::sampler _sampler [[sampler(0)]]
|
|
243
|
+
, metal::texture2d<float, metal::access::sample> _to [[texture(1)]]
|
|
244
|
+
, constant Uniforms& uniforms [[buffer(0)]]
|
|
245
|
+
) {
|
|
246
|
+
metal::float4 _fragColor = {};
|
|
247
|
+
metal::float2 _uv_1 = {};
|
|
248
|
+
const auto _uv = varyings._uv;
|
|
249
|
+
_uv_1 = _uv;
|
|
250
|
+
main_1(_from, _sampler, _to, uniforms, _fragColor, _uv_1);
|
|
251
|
+
metal::float4 _e3 = _fragColor;
|
|
252
|
+
return main_Output { _e3 };
|
|
253
|
+
}
|