gl-transitions 1.74.0 → 1.76.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/README.md +78 -0
- package/compatibility.json +2070 -0
- package/glsl3/AdvancedMosaic.glsl +21 -0
- package/glsl3/BlockDissolve.glsl +16 -0
- package/glsl3/BookFlip.glsl +37 -0
- package/glsl3/Bounce.glsl +35 -0
- package/glsl3/BowTieHorizontal.glsl +123 -0
- package/glsl3/BowTieVertical.glsl +117 -0
- package/glsl3/BowTieWithParameter.glsl +74 -0
- package/glsl3/Box.glsl +33 -0
- package/glsl3/ButterflyWaveScrawler.glsl +33 -0
- package/glsl3/CircleCrop.glsl +20 -0
- package/glsl3/ColourDistance.glsl +19 -0
- package/glsl3/CrazyParametricFun.glsl +20 -0
- package/glsl3/CrossZoom.glsl +68 -0
- package/glsl3/DefocusBlur.glsl +47 -0
- package/glsl3/Directional.glsl +18 -0
- package/glsl3/DirectionalScaled.glsl +35 -0
- package/glsl3/DoomScreenTransition.glsl +62 -0
- package/glsl3/Dreamy.glsl +14 -0
- package/glsl3/DreamyZoom.glsl +43 -0
- package/glsl3/Drop_Zone_Flicker.glsl +159 -0
- package/glsl3/EdgeTransition.glsl +50 -0
- package/glsl3/FilmBurn.glsl +63 -0
- package/glsl3/Fold.glsl +12 -0
- package/glsl3/GlitchDisplace.glsl +78 -0
- package/glsl3/GlitchMemories.glsl +17 -0
- package/glsl3/GridFlip.glsl +77 -0
- package/glsl3/HSVfade.glsl +29 -0
- package/glsl3/HorizontalClose.glsl +16 -0
- package/glsl3/HorizontalOpen.glsl +18 -0
- package/glsl3/InvertedPageCurl.glsl +228 -0
- package/glsl3/LeftRight.glsl +28 -0
- package/glsl3/LinearBlur.glsl +30 -0
- package/glsl3/Mosaic.glsl +45 -0
- package/glsl3/Overexposure.glsl +25 -0
- package/glsl3/PolkaDotsCurtain.glsl +14 -0
- package/glsl3/PuzzleRight.glsl +57 -0
- package/glsl3/Radial.glsl +19 -0
- package/glsl3/Rectangle.glsl +29 -0
- package/glsl3/RectangleCrop.glsl +30 -0
- package/glsl3/Revolve_Left.glsl +98 -0
- package/glsl3/Rolls.glsl +42 -0
- package/glsl3/RotateScaleVanish.glsl +42 -0
- package/glsl3/SimpleFlip.glsl +14 -0
- package/glsl3/SimpleZoom.glsl +20 -0
- package/glsl3/SimpleZoomOut.glsl +23 -0
- package/glsl3/Slides.glsl +41 -0
- package/glsl3/StarWipe.glsl +51 -0
- package/glsl3/StaticFade.glsl +47 -0
- package/glsl3/StereoViewer.glsl +214 -0
- package/glsl3/StripDatamoshGlitch.glsl +187 -0
- package/glsl3/Swirl.glsl +34 -0
- package/glsl3/TVStatic.glsl +29 -0
- package/glsl3/TilesWave.glsl +63 -0
- package/glsl3/TopBottom.glsl +27 -0
- package/glsl3/VerticalClose.glsl +16 -0
- package/glsl3/VerticalOpen.glsl +17 -0
- package/glsl3/WaterDrop.glsl +21 -0
- package/glsl3/ZoomInCircles.glsl +40 -0
- package/glsl3/ZoomLeftWipe.glsl +36 -0
- package/glsl3/ZoomRigthWipe.glsl +36 -0
- package/glsl3/angular.glsl +25 -0
- package/glsl3/burn.glsl +14 -0
- package/glsl3/burn0.glsl +55 -0
- package/glsl3/cannabisleaf.glsl +18 -0
- package/glsl3/chessboard.glsl +28 -0
- package/glsl3/circle.glsl +24 -0
- package/glsl3/circleopen.glsl +18 -0
- package/glsl3/colorphase.glsl +19 -0
- package/glsl3/coord-from-in.glsl +18 -0
- package/glsl3/crosshatch.glsl +20 -0
- package/glsl3/crosswarp.glsl +10 -0
- package/glsl3/cube.glsl +71 -0
- package/glsl3/directional-easing.glsl +19 -0
- package/glsl3/directionalwarp.glsl +20 -0
- package/glsl3/directionalwipe.glsl +22 -0
- package/glsl3/displacement.glsl +26 -0
- package/glsl3/dissolve.glsl +54 -0
- package/glsl3/doorway.glsl +55 -0
- package/glsl3/fade.glsl +13 -0
- package/glsl3/fadecolor.glsl +15 -0
- package/glsl3/fadegrayscale.glsl +21 -0
- package/glsl3/flyeye.glsl +20 -0
- package/glsl3/fragment.glsl +54 -0
- package/glsl3/heart.glsl +19 -0
- package/glsl3/hexagonalize.glsl +78 -0
- package/glsl3/kaleidoscope.glsl +25 -0
- package/glsl3/luma.glsl +15 -0
- package/glsl3/luminance_melt.glsl +131 -0
- package/glsl3/morph.glsl +20 -0
- package/glsl3/mosaic_transition.glsl +20 -0
- package/glsl3/multiply_blend.glsl +19 -0
- package/glsl3/old_tv_lost_signal.glsl +51 -0
- package/glsl3/parametric_glitch.glsl +29 -0
- package/glsl3/perlin.glsl +66 -0
- package/glsl3/pinwheel.glsl +20 -0
- package/glsl3/pixelize.glsl +21 -0
- package/glsl3/polar_function.glsl +24 -0
- package/glsl3/powerKaleido.glsl +57 -0
- package/glsl3/randomNoisex.glsl +15 -0
- package/glsl3/randomsquares.glsl +20 -0
- package/glsl3/ripple.glsl +20 -0
- package/glsl3/rotateTransition.glsl +22 -0
- package/glsl3/rotate_scale_fade.glsl +39 -0
- package/glsl3/scale-in.glsl +18 -0
- package/glsl3/splitSlideInHorizontal.glsl +26 -0
- package/glsl3/splitSlideInOutHorizontal.glsl +23 -0
- package/glsl3/splitSlideInOutVertical.glsl +23 -0
- package/glsl3/splitSlideInVertical.glsl +24 -0
- package/glsl3/splitSlideOutHorizontal.glsl +22 -0
- package/glsl3/splitSlideOutVertical.glsl +22 -0
- package/glsl3/squareswire.glsl +26 -0
- package/glsl3/squeeze.glsl +23 -0
- package/glsl3/static_wipe.glsl +39 -0
- package/glsl3/swap.glsl +64 -0
- package/glsl3/tangentMotionBlur.glsl +139 -0
- package/glsl3/undulatingBurnOut.glsl +56 -0
- package/glsl3/wind.glsl +25 -0
- package/glsl3/windowblinds.glsl +18 -0
- package/glsl3/windowslice.glsl +16 -0
- package/glsl3/wipeDown.glsl +12 -0
- package/glsl3/wipeLeft.glsl +12 -0
- package/glsl3/wipeRight.glsl +12 -0
- package/glsl3/wipeUp.glsl +12 -0
- package/glsl3/x_axis_translation.glsl +21 -0
- package/glsl3/zoomInOut.glsl +20 -0
- package/index.d.ts +61 -0
- package/layouts.json +2956 -0
- package/llms-full.txt +1707 -0
- package/llms.txt +153 -0
- package/msl/AdvancedMosaic.metal +136 -0
- package/msl/BlockDissolve.metal +108 -0
- package/msl/BookFlip.metal +191 -0
- package/msl/Bounce.metal +128 -0
- package/msl/BowTieHorizontal.metal +375 -0
- package/msl/BowTieVertical.metal +375 -0
- package/msl/BowTieWithParameter.metal +361 -0
- package/msl/Box.metal +204 -0
- package/msl/ButterflyWaveScrawler.metal +190 -0
- package/msl/CircleCrop.metal +117 -0
- package/msl/ColourDistance.metal +110 -0
- package/msl/CrazyParametricFun.metal +139 -0
- package/msl/CrossZoom.metal +274 -0
- package/msl/DefocusBlur.metal +297 -0
- package/msl/Directional.metal +107 -0
- package/msl/DirectionalScaled.metal +147 -0
- package/msl/DoomScreenTransition.metal +212 -0
- package/msl/Dreamy.metal +133 -0
- package/msl/DreamyZoom.metal +182 -0
- package/msl/Drop_Zone_Flicker.metal +561 -0
- package/msl/EdgeTransition.metal +277 -0
- package/msl/FilmBurn.metal +425 -0
- package/msl/Fold.metal +110 -0
- package/msl/GlitchDisplace.metal +374 -0
- package/msl/GlitchMemories.metal +146 -0
- package/msl/GridFlip.metal +285 -0
- package/msl/HSVfade.metal +161 -0
- package/msl/HorizontalClose.metal +100 -0
- package/msl/HorizontalOpen.metal +103 -0
- package/msl/InvertedPageCurl.metal +762 -0
- package/msl/LeftRight.metal +138 -0
- package/msl/LinearBlur.metal +169 -0
- package/msl/Mosaic.metal +212 -0
- package/msl/Overexposure.metal +130 -0
- package/msl/PolkaDotsCurtain.metal +112 -0
- package/msl/PuzzleRight.metal +262 -0
- package/msl/Radial.metal +102 -0
- package/msl/Rectangle.metal +129 -0
- package/msl/RectangleCrop.metal +127 -0
- package/msl/Revolve_Left.metal +363 -0
- package/msl/Rolls.metal +209 -0
- package/msl/RotateScaleVanish.metal +227 -0
- package/msl/SimpleFlip.metal +110 -0
- package/msl/SimpleZoom.metal +116 -0
- package/msl/SimpleZoomOut.metal +127 -0
- package/msl/Slides.metal +244 -0
- package/msl/StarWipe.metal +204 -0
- package/msl/StaticFade.metal +193 -0
- package/msl/StereoViewer.metal +707 -0
- package/msl/StripDatamoshGlitch.metal +828 -0
- package/msl/Swirl.metal +152 -0
- package/msl/TVStatic.metal +136 -0
- package/msl/TilesWave.metal +290 -0
- package/msl/TopBottom.metal +138 -0
- package/msl/VerticalClose.metal +100 -0
- package/msl/VerticalOpen.metal +103 -0
- package/msl/WaterDrop.metal +126 -0
- package/msl/ZoomInCircles.metal +169 -0
- package/msl/ZoomLeftWipe.metal +152 -0
- package/msl/ZoomRigthWipe.metal +152 -0
- package/msl/angular.metal +111 -0
- package/msl/burn.metal +103 -0
- package/msl/burn0.metal +236 -0
- package/msl/cannabisleaf.metal +120 -0
- package/msl/chessboard.metal +144 -0
- package/msl/circle.metal +115 -0
- package/msl/circleopen.metal +124 -0
- package/msl/colorphase.metal +106 -0
- package/msl/coord-from-in.metal +111 -0
- package/msl/crosshatch.metal +126 -0
- package/msl/crosswarp.metal +103 -0
- package/msl/cube.metal +259 -0
- package/msl/directional-easing.metal +111 -0
- package/msl/directionalwarp.metal +121 -0
- package/msl/directionalwipe.metal +120 -0
- package/msl/displacement.metal +129 -0
- package/msl/dissolve.metal +146 -0
- package/msl/doorway.metal +210 -0
- package/msl/fade.metal +95 -0
- package/msl/fadecolor.metal +104 -0
- package/msl/fadegrayscale.metal +123 -0
- package/msl/flyeye.metal +133 -0
- package/msl/fragment.metal +276 -0
- package/msl/heart.metal +134 -0
- package/msl/hexagonalize.metal +274 -0
- package/msl/kaleidoscope.metal +157 -0
- package/msl/luma.metal +113 -0
- package/msl/luminance_melt.metal +337 -0
- package/msl/morph.metal +131 -0
- package/msl/mosaic_transition.metal +137 -0
- package/msl/multiply_blend.metal +127 -0
- package/msl/old_tv_lost_signal.metal +172 -0
- package/msl/parametric_glitch.metal +152 -0
- package/msl/perlin.metal +206 -0
- package/msl/pinwheel.metal +112 -0
- package/msl/pixelize.metal +134 -0
- package/msl/polar_function.metal +116 -0
- package/msl/powerKaleido.metal +304 -0
- package/msl/randomNoisex.metal +115 -0
- package/msl/randomsquares.metal +118 -0
- package/msl/ripple.metal +113 -0
- package/msl/rotateTransition.metal +116 -0
- package/msl/rotate_scale_fade.metal +167 -0
- package/msl/scale-in.metal +111 -0
- package/msl/splitSlideInHorizontal.metal +147 -0
- package/msl/splitSlideInOutHorizontal.metal +138 -0
- package/msl/splitSlideInOutVertical.metal +138 -0
- package/msl/splitSlideInVertical.metal +144 -0
- package/msl/splitSlideOutHorizontal.metal +131 -0
- package/msl/splitSlideOutVertical.metal +131 -0
- package/msl/squareswire.metal +144 -0
- package/msl/squeeze.metal +133 -0
- package/msl/static_wipe.metal +147 -0
- package/msl/swap.metal +256 -0
- package/msl/tangentMotionBlur.metal +583 -0
- package/msl/undulatingBurnOut.metal +217 -0
- package/msl/wind.metal +131 -0
- package/msl/windowblinds.metal +107 -0
- package/msl/windowslice.metal +108 -0
- package/msl/wipeDown.metal +105 -0
- package/msl/wipeLeft.metal +105 -0
- package/msl/wipeRight.metal +105 -0
- package/msl/wipeUp.metal +105 -0
- package/msl/x_axis_translation.metal +110 -0
- package/msl/zoomInOut.metal +125 -0
- package/package.json +1 -1
- package/skills/gl-transitions/SKILL.md +46 -0
- package/skills/gl-transitions/references/catalog.md +224 -0
- package/skills/gl-transitions/references/skia.md +118 -0
- package/skills/gl-transitions/references/video.md +71 -0
- package/skills/gl-transitions/references/webgl.md +122 -0
- package/sksl/index.d.ts +4 -0
- package/sksl/index.js +1 -0
- package/wgsl/AdvancedMosaic.wgsl +108 -0
- package/wgsl/BlockDissolve.wgsl +78 -0
- package/wgsl/BookFlip.wgsl +157 -0
- package/wgsl/Bounce.wgsl +98 -0
- package/wgsl/BowTieHorizontal.wgsl +331 -0
- package/wgsl/BowTieVertical.wgsl +331 -0
- package/wgsl/BowTieWithParameter.wgsl +313 -0
- package/wgsl/Box.wgsl +176 -0
- package/wgsl/ButterflyWaveScrawler.wgsl +158 -0
- package/wgsl/CircleCrop.wgsl +88 -0
- package/wgsl/ColourDistance.wgsl +82 -0
- package/wgsl/CrazyParametricFun.wgsl +111 -0
- package/wgsl/CrossZoom.wgsl +219 -0
- package/wgsl/DefocusBlur.wgsl +269 -0
- package/wgsl/Directional.wgsl +79 -0
- package/wgsl/DirectionalScaled.wgsl +117 -0
- package/wgsl/DoomScreenTransition.wgsl +171 -0
- package/wgsl/Dreamy.wgsl +102 -0
- package/wgsl/DreamyZoom.wgsl +154 -0
- package/wgsl/Drop_Zone_Flicker.wgsl +513 -0
- package/wgsl/EdgeTransition.wgsl +216 -0
- package/wgsl/FilmBurn.wgsl +361 -0
- package/wgsl/Fold.wgsl +82 -0
- package/wgsl/GlitchDisplace.wgsl +327 -0
- package/wgsl/GlitchMemories.wgsl +118 -0
- package/wgsl/GridFlip.wgsl +250 -0
- package/wgsl/HSVfade.wgsl +131 -0
- package/wgsl/HorizontalClose.wgsl +72 -0
- package/wgsl/HorizontalOpen.wgsl +75 -0
- package/wgsl/InvertedPageCurl.wgsl +690 -0
- package/wgsl/LeftRight.wgsl +109 -0
- package/wgsl/LinearBlur.wgsl +131 -0
- package/wgsl/Mosaic.wgsl +174 -0
- package/wgsl/Overexposure.wgsl +102 -0
- package/wgsl/PolkaDotsCurtain.wgsl +83 -0
- package/wgsl/PuzzleRight.wgsl +230 -0
- package/wgsl/Radial.wgsl +74 -0
- package/wgsl/Rectangle.wgsl +100 -0
- package/wgsl/RectangleCrop.wgsl +98 -0
- package/wgsl/Revolve_Left.wgsl +314 -0
- package/wgsl/Rolls.wgsl +181 -0
- package/wgsl/RotateScaleVanish.wgsl +199 -0
- package/wgsl/SimpleFlip.wgsl +82 -0
- package/wgsl/SimpleZoom.wgsl +85 -0
- package/wgsl/SimpleZoomOut.wgsl +96 -0
- package/wgsl/Slides.wgsl +216 -0
- package/wgsl/StarWipe.wgsl +169 -0
- package/wgsl/StaticFade.wgsl +159 -0
- package/wgsl/StereoViewer.wgsl +625 -0
- package/wgsl/StripDatamoshGlitch.wgsl +755 -0
- package/wgsl/Swirl.wgsl +124 -0
- package/wgsl/TVStatic.wgsl +106 -0
- package/wgsl/TilesWave.wgsl +262 -0
- package/wgsl/TopBottom.wgsl +109 -0
- package/wgsl/VerticalClose.wgsl +72 -0
- package/wgsl/VerticalOpen.wgsl +75 -0
- package/wgsl/WaterDrop.wgsl +98 -0
- package/wgsl/ZoomInCircles.wgsl +138 -0
- package/wgsl/ZoomLeftWipe.wgsl +121 -0
- package/wgsl/ZoomRigthWipe.wgsl +121 -0
- package/wgsl/angular.wgsl +83 -0
- package/wgsl/burn.wgsl +74 -0
- package/wgsl/burn0.wgsl +198 -0
- package/wgsl/cannabisleaf.wgsl +92 -0
- package/wgsl/chessboard.wgsl +116 -0
- package/wgsl/circle.wgsl +87 -0
- package/wgsl/circleopen.wgsl +96 -0
- package/wgsl/colorphase.wgsl +77 -0
- package/wgsl/coord-from-in.wgsl +83 -0
- package/wgsl/crosshatch.wgsl +96 -0
- package/wgsl/crosswarp.wgsl +75 -0
- package/wgsl/cube.wgsl +217 -0
- package/wgsl/directional-easing.wgsl +83 -0
- package/wgsl/directionalwarp.wgsl +92 -0
- package/wgsl/directionalwipe.wgsl +91 -0
- package/wgsl/displacement.wgsl +96 -0
- package/wgsl/dissolve.wgsl +116 -0
- package/wgsl/doorway.wgsl +174 -0
- package/wgsl/fade.wgsl +67 -0
- package/wgsl/fadecolor.wgsl +75 -0
- package/wgsl/fadegrayscale.wgsl +93 -0
- package/wgsl/flyeye.wgsl +105 -0
- package/wgsl/fragment.wgsl +227 -0
- package/wgsl/heart.wgsl +103 -0
- package/wgsl/hexagonalize.wgsl +238 -0
- package/wgsl/kaleidoscope.wgsl +124 -0
- package/wgsl/luma.wgsl +80 -0
- package/wgsl/luminance_melt.wgsl +299 -0
- package/wgsl/morph.wgsl +103 -0
- package/wgsl/mosaic_transition.wgsl +107 -0
- package/wgsl/multiply_blend.wgsl +96 -0
- package/wgsl/old_tv_lost_signal.wgsl +142 -0
- package/wgsl/parametric_glitch.wgsl +124 -0
- package/wgsl/perlin.wgsl +174 -0
- package/wgsl/pinwheel.wgsl +84 -0
- package/wgsl/pixelize.wgsl +105 -0
- package/wgsl/polar_function.wgsl +88 -0
- package/wgsl/powerKaleido.wgsl +254 -0
- package/wgsl/randomNoisex.wgsl +85 -0
- package/wgsl/randomsquares.wgsl +87 -0
- package/wgsl/ripple.wgsl +85 -0
- package/wgsl/rotateTransition.wgsl +85 -0
- package/wgsl/rotate_scale_fade.wgsl +138 -0
- package/wgsl/scale-in.wgsl +79 -0
- package/wgsl/splitSlideInHorizontal.wgsl +118 -0
- package/wgsl/splitSlideInOutHorizontal.wgsl +109 -0
- package/wgsl/splitSlideInOutVertical.wgsl +109 -0
- package/wgsl/splitSlideInVertical.wgsl +115 -0
- package/wgsl/splitSlideOutHorizontal.wgsl +102 -0
- package/wgsl/splitSlideOutVertical.wgsl +102 -0
- package/wgsl/squareswire.wgsl +115 -0
- package/wgsl/squeeze.wgsl +105 -0
- package/wgsl/static_wipe.wgsl +117 -0
- package/wgsl/swap.wgsl +218 -0
- package/wgsl/tangentMotionBlur.wgsl +503 -0
- package/wgsl/undulatingBurnOut.wgsl +181 -0
- package/wgsl/wind.wgsl +101 -0
- package/wgsl/windowblinds.wgsl +79 -0
- package/wgsl/windowslice.wgsl +80 -0
- package/wgsl/wipeDown.wgsl +77 -0
- package/wgsl/wipeLeft.wgsl +77 -0
- package/wgsl/wipeRight.wgsl +77 -0
- package/wgsl/wipeUp.wgsl +77 -0
- package/wgsl/x_axis_translation.wgsl +82 -0
- package/wgsl/zoomInOut.wgsl +94 -0
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
// tangentMotionBlur — MSL, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/tangentMotionBlur.glsl
|
|
2
|
+
// Author: chenkai
|
|
3
|
+
// License: MIT
|
|
4
|
+
// Description: The outgoing image is flung away along a curve with motion blur
|
|
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
|
+
};
|
|
17
|
+
|
|
18
|
+
metal::float4 getToColor(
|
|
19
|
+
thread metal::float2& uv,
|
|
20
|
+
metal::sampler _sampler,
|
|
21
|
+
metal::texture2d<float, metal::access::sample> _to
|
|
22
|
+
) {
|
|
23
|
+
float _e36 = uv[0u];
|
|
24
|
+
float _e38 = uv[1u];
|
|
25
|
+
metal::float4 _e41 = _to.sample(_sampler, metal::float2(_e36, 1.0 - _e38), metal::level(0.0));
|
|
26
|
+
return _e41;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
float rand(
|
|
30
|
+
thread metal::float2& co
|
|
31
|
+
) {
|
|
32
|
+
metal::float2 _e35 = co;
|
|
33
|
+
return metal::fract(metal::sin(metal::dot(_e35, metal::float2(12.9898, 78.233))) * 43758.547);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
metal::float4 motionBlurTo(
|
|
37
|
+
thread metal::float2& _st,
|
|
38
|
+
thread metal::float2& speed,
|
|
39
|
+
metal::sampler _sampler,
|
|
40
|
+
metal::texture2d<float, metal::access::sample> _to
|
|
41
|
+
) {
|
|
42
|
+
metal::float2 texCoord = {};
|
|
43
|
+
metal::float3 color = {};
|
|
44
|
+
float total = {};
|
|
45
|
+
float offset = {};
|
|
46
|
+
metal::float2 param = {};
|
|
47
|
+
float t = {};
|
|
48
|
+
float percent = {};
|
|
49
|
+
float weight = {};
|
|
50
|
+
metal::float2 newuv = {};
|
|
51
|
+
metal::float2 param_1 = {};
|
|
52
|
+
metal::float2 _e46 = _st;
|
|
53
|
+
texCoord = _e46 / metal::float2(1.0, 1.0);
|
|
54
|
+
color = metal::float3(0.0, 0.0, 0.0);
|
|
55
|
+
total = 0.0;
|
|
56
|
+
metal::float2 _e48 = _st;
|
|
57
|
+
param = _e48;
|
|
58
|
+
float _e49 = rand(param);
|
|
59
|
+
offset = _e49;
|
|
60
|
+
t = 0.0;
|
|
61
|
+
uint2 loop_bound = uint2(4294967295u);
|
|
62
|
+
bool loop_init = true;
|
|
63
|
+
while(true) {
|
|
64
|
+
if (metal::all(loop_bound == uint2(0u))) { break; }
|
|
65
|
+
loop_bound -= uint2(loop_bound.y == 0u, 1u);
|
|
66
|
+
if (!loop_init) {
|
|
67
|
+
float _e79 = t;
|
|
68
|
+
t = _e79 + 1.0;
|
|
69
|
+
}
|
|
70
|
+
loop_init = false;
|
|
71
|
+
float _e50 = t;
|
|
72
|
+
if (_e50 <= 20.0) {
|
|
73
|
+
float _e52 = t;
|
|
74
|
+
float _e53 = offset;
|
|
75
|
+
percent = (_e52 + _e53) / 20.0;
|
|
76
|
+
float _e56 = percent;
|
|
77
|
+
float _e57 = percent;
|
|
78
|
+
float _e58 = percent;
|
|
79
|
+
weight = 4.0 * (_e56 - (_e57 * _e58));
|
|
80
|
+
metal::float2 _e62 = texCoord;
|
|
81
|
+
metal::float2 _e63 = speed;
|
|
82
|
+
float _e64 = percent;
|
|
83
|
+
newuv = _e62 + (_e63 * _e64);
|
|
84
|
+
metal::float2 _e67 = newuv;
|
|
85
|
+
newuv = metal::fract(_e67);
|
|
86
|
+
metal::float2 _e69 = newuv;
|
|
87
|
+
param_1 = _e69;
|
|
88
|
+
metal::float4 _e70 = getToColor(param_1, _sampler, _to);
|
|
89
|
+
float _e72 = weight;
|
|
90
|
+
metal::float3 _e74 = color;
|
|
91
|
+
color = _e74 + (_e70.xyz * _e72);
|
|
92
|
+
float _e76 = weight;
|
|
93
|
+
float _e77 = total;
|
|
94
|
+
total = _e77 + _e76;
|
|
95
|
+
continue;
|
|
96
|
+
} else {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
metal::float3 _e81 = color;
|
|
101
|
+
float _e82 = total;
|
|
102
|
+
metal::float3 _e84 = _e81 / metal::float3(_e82);
|
|
103
|
+
return metal::float4(_e84.x, _e84.y, _e84.z, 1.0);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
metal::float4 getFromColor(
|
|
107
|
+
thread metal::float2& uv_1,
|
|
108
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
109
|
+
metal::sampler _sampler
|
|
110
|
+
) {
|
|
111
|
+
float _e36 = uv_1[0u];
|
|
112
|
+
float _e38 = uv_1[1u];
|
|
113
|
+
metal::float4 _e41 = _from.sample(_sampler, metal::float2(_e36, 1.0 - _e38), metal::level(0.0));
|
|
114
|
+
return _e41;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
metal::float4 motionBlurFrom(
|
|
118
|
+
thread metal::float2& _st_1,
|
|
119
|
+
thread metal::float2& speed_1,
|
|
120
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
121
|
+
metal::sampler _sampler
|
|
122
|
+
) {
|
|
123
|
+
metal::float2 texCoord_1 = {};
|
|
124
|
+
metal::float3 color_1 = {};
|
|
125
|
+
float total_1 = {};
|
|
126
|
+
float offset_1 = {};
|
|
127
|
+
metal::float2 param_2 = {};
|
|
128
|
+
float t_1 = {};
|
|
129
|
+
float percent_1 = {};
|
|
130
|
+
float weight_1 = {};
|
|
131
|
+
metal::float2 newuv_1 = {};
|
|
132
|
+
metal::float2 param_3 = {};
|
|
133
|
+
metal::float2 _e46 = _st_1;
|
|
134
|
+
texCoord_1 = _e46 / metal::float2(1.0, 1.0);
|
|
135
|
+
color_1 = metal::float3(0.0, 0.0, 0.0);
|
|
136
|
+
total_1 = 0.0;
|
|
137
|
+
metal::float2 _e48 = _st_1;
|
|
138
|
+
param_2 = _e48;
|
|
139
|
+
float _e49 = rand(param_2);
|
|
140
|
+
offset_1 = _e49;
|
|
141
|
+
t_1 = 0.0;
|
|
142
|
+
uint2 loop_bound_1 = uint2(4294967295u);
|
|
143
|
+
bool loop_init_1 = true;
|
|
144
|
+
while(true) {
|
|
145
|
+
if (metal::all(loop_bound_1 == uint2(0u))) { break; }
|
|
146
|
+
loop_bound_1 -= uint2(loop_bound_1.y == 0u, 1u);
|
|
147
|
+
if (!loop_init_1) {
|
|
148
|
+
float _e79 = t_1;
|
|
149
|
+
t_1 = _e79 + 1.0;
|
|
150
|
+
}
|
|
151
|
+
loop_init_1 = false;
|
|
152
|
+
float _e50 = t_1;
|
|
153
|
+
if (_e50 <= 20.0) {
|
|
154
|
+
float _e52 = t_1;
|
|
155
|
+
float _e53 = offset_1;
|
|
156
|
+
percent_1 = (_e52 + _e53) / 20.0;
|
|
157
|
+
float _e56 = percent_1;
|
|
158
|
+
float _e57 = percent_1;
|
|
159
|
+
float _e58 = percent_1;
|
|
160
|
+
weight_1 = 4.0 * (_e56 - (_e57 * _e58));
|
|
161
|
+
metal::float2 _e62 = texCoord_1;
|
|
162
|
+
metal::float2 _e63 = speed_1;
|
|
163
|
+
float _e64 = percent_1;
|
|
164
|
+
newuv_1 = _e62 + (_e63 * _e64);
|
|
165
|
+
metal::float2 _e67 = newuv_1;
|
|
166
|
+
newuv_1 = metal::fract(_e67);
|
|
167
|
+
metal::float2 _e69 = newuv_1;
|
|
168
|
+
param_3 = _e69;
|
|
169
|
+
metal::float4 _e70 = getFromColor(param_3, _from, _sampler);
|
|
170
|
+
float _e72 = weight_1;
|
|
171
|
+
metal::float3 _e74 = color_1;
|
|
172
|
+
color_1 = _e74 + (_e70.xyz * _e72);
|
|
173
|
+
float _e76 = weight_1;
|
|
174
|
+
float _e77 = total_1;
|
|
175
|
+
total_1 = _e77 + _e76;
|
|
176
|
+
continue;
|
|
177
|
+
} else {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
metal::float3 _e81 = color_1;
|
|
182
|
+
float _e82 = total_1;
|
|
183
|
+
metal::float3 _e84 = _e81 / metal::float3(_e82);
|
|
184
|
+
return metal::float4(_e84.x, _e84.y, _e84.z, 1.0);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
metal::float2 rotateUv(
|
|
188
|
+
thread metal::float2& uv_2,
|
|
189
|
+
thread float& angle,
|
|
190
|
+
thread metal::float2& anchor,
|
|
191
|
+
thread float& zDirection
|
|
192
|
+
) {
|
|
193
|
+
float s = {};
|
|
194
|
+
float c = {};
|
|
195
|
+
metal::float2x2 m = {};
|
|
196
|
+
metal::float2 _e41 = uv_2;
|
|
197
|
+
metal::float2 _e42 = anchor;
|
|
198
|
+
uv_2 = _e41 - _e42;
|
|
199
|
+
float _e44 = angle;
|
|
200
|
+
s = metal::sin(_e44);
|
|
201
|
+
float _e46 = angle;
|
|
202
|
+
c = metal::cos(_e46);
|
|
203
|
+
float _e48 = c;
|
|
204
|
+
float _e49 = s;
|
|
205
|
+
float _e51 = s;
|
|
206
|
+
float _e52 = c;
|
|
207
|
+
m = metal::float2x2(metal::float2(_e48, -(_e49)), metal::float2(_e51, _e52));
|
|
208
|
+
metal::float2x2 _e56 = m;
|
|
209
|
+
metal::float2 _e57 = uv_2;
|
|
210
|
+
uv_2 = _e56 * _e57;
|
|
211
|
+
metal::float2 _e59 = anchor;
|
|
212
|
+
metal::float2 _e60 = uv_2;
|
|
213
|
+
uv_2 = _e60 + _e59;
|
|
214
|
+
metal::float2 _e62 = uv_2;
|
|
215
|
+
return _e62;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
float normpdf(
|
|
219
|
+
thread float& x
|
|
220
|
+
) {
|
|
221
|
+
float d = {};
|
|
222
|
+
float _e36 = x;
|
|
223
|
+
d = _e36 - 0.5;
|
|
224
|
+
float _e38 = d;
|
|
225
|
+
float _e40 = d;
|
|
226
|
+
return metal::exp((-20.0 * _e38) * _e40);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
float C(
|
|
230
|
+
thread float& aA1_
|
|
231
|
+
) {
|
|
232
|
+
float _e35 = aA1_;
|
|
233
|
+
return 3.0 * _e35;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
float B(
|
|
237
|
+
thread float& aA1_1,
|
|
238
|
+
thread float& aA2_
|
|
239
|
+
) {
|
|
240
|
+
float _e36 = aA2_;
|
|
241
|
+
float _e38 = aA1_1;
|
|
242
|
+
return (3.0 * _e36) - (6.0 * _e38);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
float A(
|
|
246
|
+
thread float& aA1_2,
|
|
247
|
+
thread float& aA2_1
|
|
248
|
+
) {
|
|
249
|
+
float _e36 = aA2_1;
|
|
250
|
+
float _e39 = aA1_2;
|
|
251
|
+
return (1.0 - (3.0 * _e36)) + (3.0 * _e39);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
float CalcBezier(
|
|
255
|
+
thread float& aT,
|
|
256
|
+
thread float& aA1_3,
|
|
257
|
+
thread float& aA2_2
|
|
258
|
+
) {
|
|
259
|
+
float param_4 = {};
|
|
260
|
+
float param_5 = {};
|
|
261
|
+
float param_6 = {};
|
|
262
|
+
float param_7 = {};
|
|
263
|
+
float param_8 = {};
|
|
264
|
+
float _e42 = aA1_3;
|
|
265
|
+
param_4 = _e42;
|
|
266
|
+
float _e43 = aA2_2;
|
|
267
|
+
param_5 = _e43;
|
|
268
|
+
float _e44 = A(param_4, param_5);
|
|
269
|
+
float _e45 = aT;
|
|
270
|
+
float _e47 = aA1_3;
|
|
271
|
+
param_6 = _e47;
|
|
272
|
+
float _e48 = aA2_2;
|
|
273
|
+
param_7 = _e48;
|
|
274
|
+
float _e49 = B(param_6, param_7);
|
|
275
|
+
float _e51 = aT;
|
|
276
|
+
float _e53 = aA1_3;
|
|
277
|
+
param_8 = _e53;
|
|
278
|
+
float _e54 = C(param_8);
|
|
279
|
+
float _e56 = aT;
|
|
280
|
+
return ((((_e44 * _e45) + _e49) * _e51) + _e54) * _e56;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
float GetSlope(
|
|
284
|
+
thread float& aT_1,
|
|
285
|
+
thread float& aA1_4,
|
|
286
|
+
thread float& aA2_3
|
|
287
|
+
) {
|
|
288
|
+
float param_9 = {};
|
|
289
|
+
float param_10 = {};
|
|
290
|
+
float param_11 = {};
|
|
291
|
+
float param_12 = {};
|
|
292
|
+
float param_13 = {};
|
|
293
|
+
float _e42 = aA1_4;
|
|
294
|
+
param_9 = _e42;
|
|
295
|
+
float _e43 = aA2_3;
|
|
296
|
+
param_10 = _e43;
|
|
297
|
+
float _e44 = A(param_9, param_10);
|
|
298
|
+
float _e46 = aT_1;
|
|
299
|
+
float _e48 = aT_1;
|
|
300
|
+
float _e50 = aA1_4;
|
|
301
|
+
param_11 = _e50;
|
|
302
|
+
float _e51 = aA2_3;
|
|
303
|
+
param_12 = _e51;
|
|
304
|
+
float _e52 = B(param_11, param_12);
|
|
305
|
+
float _e54 = aT_1;
|
|
306
|
+
float _e57 = aA1_4;
|
|
307
|
+
param_13 = _e57;
|
|
308
|
+
float _e58 = C(param_13);
|
|
309
|
+
return ((((3.0 * _e44) * _e46) * _e48) + ((2.0 * _e52) * _e54)) + _e58;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
float GetTForX(
|
|
313
|
+
thread float& aX,
|
|
314
|
+
thread float& mX1_,
|
|
315
|
+
thread float& mX2_
|
|
316
|
+
) {
|
|
317
|
+
float aGuessT = {};
|
|
318
|
+
int i = {};
|
|
319
|
+
float currentSlope = {};
|
|
320
|
+
float param_14 = {};
|
|
321
|
+
float param_15 = {};
|
|
322
|
+
float param_16 = {};
|
|
323
|
+
float currentX = {};
|
|
324
|
+
float param_17 = {};
|
|
325
|
+
float param_18 = {};
|
|
326
|
+
float param_19 = {};
|
|
327
|
+
float _e47 = aX;
|
|
328
|
+
aGuessT = _e47;
|
|
329
|
+
i = 0;
|
|
330
|
+
uint2 loop_bound_2 = uint2(4294967295u);
|
|
331
|
+
bool loop_init_2 = true;
|
|
332
|
+
while(true) {
|
|
333
|
+
if (metal::all(loop_bound_2 == uint2(0u))) { break; }
|
|
334
|
+
loop_bound_2 -= uint2(loop_bound_2.y == 0u, 1u);
|
|
335
|
+
if (!loop_init_2) {
|
|
336
|
+
int _e68 = i;
|
|
337
|
+
i = as_type<int>(as_type<uint>(_e68) + as_type<uint>(1));
|
|
338
|
+
}
|
|
339
|
+
loop_init_2 = false;
|
|
340
|
+
int _e48 = i;
|
|
341
|
+
if (_e48 < 4) {
|
|
342
|
+
float _e50 = aGuessT;
|
|
343
|
+
param_14 = _e50;
|
|
344
|
+
float _e51 = mX1_;
|
|
345
|
+
param_15 = _e51;
|
|
346
|
+
float _e52 = mX2_;
|
|
347
|
+
param_16 = _e52;
|
|
348
|
+
float _e53 = GetSlope(param_14, param_15, param_16);
|
|
349
|
+
currentSlope = _e53;
|
|
350
|
+
float _e54 = currentSlope;
|
|
351
|
+
if (_e54 == 0.0) {
|
|
352
|
+
float _e56 = aGuessT;
|
|
353
|
+
return _e56;
|
|
354
|
+
}
|
|
355
|
+
float _e57 = aGuessT;
|
|
356
|
+
param_17 = _e57;
|
|
357
|
+
float _e58 = mX1_;
|
|
358
|
+
param_18 = _e58;
|
|
359
|
+
float _e59 = mX2_;
|
|
360
|
+
param_19 = _e59;
|
|
361
|
+
float _e60 = CalcBezier(param_17, param_18, param_19);
|
|
362
|
+
float _e61 = aX;
|
|
363
|
+
currentX = _e60 - _e61;
|
|
364
|
+
float _e63 = currentX;
|
|
365
|
+
float _e64 = currentSlope;
|
|
366
|
+
float _e66 = aGuessT;
|
|
367
|
+
aGuessT = _e66 - (_e63 / _e64);
|
|
368
|
+
continue;
|
|
369
|
+
} else {
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
float _e70 = aGuessT;
|
|
374
|
+
return _e70;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
float KeySpline(
|
|
378
|
+
thread float& aX_1,
|
|
379
|
+
thread float& mX1_1,
|
|
380
|
+
thread float& mY1_,
|
|
381
|
+
thread float& mX2_1,
|
|
382
|
+
thread float& mY2_
|
|
383
|
+
) {
|
|
384
|
+
float param_20 = {};
|
|
385
|
+
float param_21 = {};
|
|
386
|
+
float param_22 = {};
|
|
387
|
+
float param_23 = {};
|
|
388
|
+
float param_24 = {};
|
|
389
|
+
float param_25 = {};
|
|
390
|
+
float _e45 = mX1_1;
|
|
391
|
+
float _e46 = mY1_;
|
|
392
|
+
float _e48 = mX2_1;
|
|
393
|
+
float _e49 = mY2_;
|
|
394
|
+
if ((_e45 == _e46) && (_e48 == _e49)) {
|
|
395
|
+
float _e52 = aX_1;
|
|
396
|
+
return _e52;
|
|
397
|
+
}
|
|
398
|
+
float _e53 = aX_1;
|
|
399
|
+
param_20 = _e53;
|
|
400
|
+
float _e54 = mX1_1;
|
|
401
|
+
param_21 = _e54;
|
|
402
|
+
float _e55 = mX2_1;
|
|
403
|
+
param_22 = _e55;
|
|
404
|
+
float _e56 = GetTForX(param_20, param_21, param_22);
|
|
405
|
+
param_23 = _e56;
|
|
406
|
+
float _e57 = mY1_;
|
|
407
|
+
param_24 = _e57;
|
|
408
|
+
float _e58 = mY2_;
|
|
409
|
+
param_25 = _e58;
|
|
410
|
+
float _e59 = CalcBezier(param_23, param_24, param_25);
|
|
411
|
+
return _e59;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
metal::float4 transition(
|
|
415
|
+
thread metal::float2& uv_3,
|
|
416
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
417
|
+
metal::sampler _sampler,
|
|
418
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
419
|
+
constant Uniforms& uniforms
|
|
420
|
+
) {
|
|
421
|
+
metal::float2 myst = {};
|
|
422
|
+
float animationTime = {};
|
|
423
|
+
float easingTime = {};
|
|
424
|
+
float param_26 = {};
|
|
425
|
+
float param_27 = {};
|
|
426
|
+
float param_28 = {};
|
|
427
|
+
float param_29 = {};
|
|
428
|
+
float param_30 = {};
|
|
429
|
+
float blur = {};
|
|
430
|
+
float param_31 = {};
|
|
431
|
+
float r = {};
|
|
432
|
+
float rotation = {};
|
|
433
|
+
metal::float2 mystCurrent = {};
|
|
434
|
+
metal::float2 param_32 = {};
|
|
435
|
+
float param_33 = {};
|
|
436
|
+
metal::float2 param_34 = {};
|
|
437
|
+
float param_35 = {};
|
|
438
|
+
float timeInterval = {};
|
|
439
|
+
metal::float2 mystNext = {};
|
|
440
|
+
metal::float2 param_36 = {};
|
|
441
|
+
float param_37 = {};
|
|
442
|
+
metal::float2 param_38 = {};
|
|
443
|
+
float param_39 = {};
|
|
444
|
+
metal::float2 speed_2 = {};
|
|
445
|
+
metal::float2 param_40 = {};
|
|
446
|
+
metal::float2 param_41 = {};
|
|
447
|
+
metal::float2 param_42 = {};
|
|
448
|
+
metal::float2 param_43 = {};
|
|
449
|
+
metal::float2 _e63 = uv_3;
|
|
450
|
+
myst = _e63;
|
|
451
|
+
float _e65 = uniforms.progress;
|
|
452
|
+
animationTime = _e65;
|
|
453
|
+
float _e66 = animationTime;
|
|
454
|
+
param_26 = _e66;
|
|
455
|
+
param_27 = 0.68;
|
|
456
|
+
param_28 = 0.01;
|
|
457
|
+
param_29 = 0.17;
|
|
458
|
+
param_30 = 0.98;
|
|
459
|
+
float _e67 = KeySpline(param_26, param_27, param_28, param_29, param_30);
|
|
460
|
+
easingTime = _e67;
|
|
461
|
+
float _e68 = easingTime;
|
|
462
|
+
param_31 = _e68;
|
|
463
|
+
float _e69 = normpdf(param_31);
|
|
464
|
+
blur = _e69;
|
|
465
|
+
r = 0.0;
|
|
466
|
+
rotation = 3.14159;
|
|
467
|
+
float _e70 = easingTime;
|
|
468
|
+
if (_e70 <= 0.5) {
|
|
469
|
+
float _e72 = rotation;
|
|
470
|
+
float _e73 = easingTime;
|
|
471
|
+
r = _e72 * _e73;
|
|
472
|
+
} else {
|
|
473
|
+
float _e75 = rotation;
|
|
474
|
+
float _e77 = rotation;
|
|
475
|
+
float _e78 = easingTime;
|
|
476
|
+
r = -(_e75) + (_e77 * _e78);
|
|
477
|
+
}
|
|
478
|
+
metal::float2 _e81 = myst;
|
|
479
|
+
mystCurrent = _e81;
|
|
480
|
+
float _e83 = uniforms.ratio;
|
|
481
|
+
float _e86 = mystCurrent[1u];
|
|
482
|
+
mystCurrent[1u] = _e86 * (1.0 / _e83);
|
|
483
|
+
metal::float2 _e89 = mystCurrent;
|
|
484
|
+
param_32 = _e89;
|
|
485
|
+
float _e90 = r;
|
|
486
|
+
param_33 = _e90;
|
|
487
|
+
param_34 = metal::float2(1.0, 0.0);
|
|
488
|
+
param_35 = -1.0;
|
|
489
|
+
metal::float2 _e91 = rotateUv(param_32, param_33, param_34, param_35);
|
|
490
|
+
mystCurrent = _e91;
|
|
491
|
+
float _e93 = uniforms.ratio;
|
|
492
|
+
float _e95 = mystCurrent[1u];
|
|
493
|
+
mystCurrent[1u] = _e95 * _e93;
|
|
494
|
+
timeInterval = 0.0334;
|
|
495
|
+
float _e98 = easingTime;
|
|
496
|
+
if (_e98 <= 0.5) {
|
|
497
|
+
float _e100 = rotation;
|
|
498
|
+
float _e101 = easingTime;
|
|
499
|
+
float _e102 = timeInterval;
|
|
500
|
+
r = _e100 * (_e101 + _e102);
|
|
501
|
+
} else {
|
|
502
|
+
float _e105 = rotation;
|
|
503
|
+
float _e107 = rotation;
|
|
504
|
+
float _e108 = easingTime;
|
|
505
|
+
float _e109 = timeInterval;
|
|
506
|
+
r = -(_e105) + (_e107 * (_e108 + _e109));
|
|
507
|
+
}
|
|
508
|
+
metal::float2 _e113 = myst;
|
|
509
|
+
mystNext = _e113;
|
|
510
|
+
float _e115 = uniforms.ratio;
|
|
511
|
+
float _e118 = mystNext[1u];
|
|
512
|
+
mystNext[1u] = _e118 * (1.0 / _e115);
|
|
513
|
+
metal::float2 _e121 = mystNext;
|
|
514
|
+
param_36 = _e121;
|
|
515
|
+
float _e122 = r;
|
|
516
|
+
param_37 = _e122;
|
|
517
|
+
param_38 = metal::float2(1.0, 0.0);
|
|
518
|
+
param_39 = -1.0;
|
|
519
|
+
metal::float2 _e123 = rotateUv(param_36, param_37, param_38, param_39);
|
|
520
|
+
mystNext = _e123;
|
|
521
|
+
float _e125 = uniforms.ratio;
|
|
522
|
+
float _e127 = mystNext[1u];
|
|
523
|
+
mystNext[1u] = _e127 * _e125;
|
|
524
|
+
metal::float2 _e130 = mystNext;
|
|
525
|
+
metal::float2 _e131 = mystCurrent;
|
|
526
|
+
float _e133 = timeInterval;
|
|
527
|
+
float _e136 = blur;
|
|
528
|
+
speed_2 = (((_e130 - _e131) / metal::float2(_e133)) * _e136) * 0.5;
|
|
529
|
+
float _e139 = easingTime;
|
|
530
|
+
if (_e139 <= 0.5) {
|
|
531
|
+
metal::float2 _e141 = mystCurrent;
|
|
532
|
+
param_40 = _e141;
|
|
533
|
+
metal::float2 _e142 = speed_2;
|
|
534
|
+
param_41 = _e142;
|
|
535
|
+
metal::float4 _e143 = motionBlurFrom(param_40, param_41, _from, _sampler);
|
|
536
|
+
return _e143;
|
|
537
|
+
} else {
|
|
538
|
+
metal::float2 _e144 = mystCurrent;
|
|
539
|
+
param_42 = _e144;
|
|
540
|
+
metal::float2 _e145 = speed_2;
|
|
541
|
+
param_43 = _e145;
|
|
542
|
+
metal::float4 _e146 = motionBlurTo(param_42, param_43, _sampler, _to);
|
|
543
|
+
return _e146;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
void main_1(
|
|
548
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
549
|
+
metal::sampler _sampler,
|
|
550
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
551
|
+
constant Uniforms& uniforms,
|
|
552
|
+
thread metal::float4& _fragColor,
|
|
553
|
+
thread metal::float2& _uv_1
|
|
554
|
+
) {
|
|
555
|
+
metal::float2 param_44 = {};
|
|
556
|
+
metal::float2 _e35 = _uv_1;
|
|
557
|
+
param_44 = _e35;
|
|
558
|
+
metal::float4 _e36 = transition(param_44, _from, _sampler, _to, uniforms);
|
|
559
|
+
_fragColor = _e36;
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
struct main_Input {
|
|
564
|
+
metal::float2 _uv [[user(loc0), center_perspective]];
|
|
565
|
+
};
|
|
566
|
+
struct main_Output {
|
|
567
|
+
metal::float4 member [[color(0)]];
|
|
568
|
+
};
|
|
569
|
+
fragment main_Output main_(
|
|
570
|
+
main_Input varyings [[stage_in]]
|
|
571
|
+
, metal::texture2d<float, metal::access::sample> _from [[texture(0)]]
|
|
572
|
+
, metal::sampler _sampler [[sampler(0)]]
|
|
573
|
+
, metal::texture2d<float, metal::access::sample> _to [[texture(1)]]
|
|
574
|
+
, constant Uniforms& uniforms [[buffer(0)]]
|
|
575
|
+
) {
|
|
576
|
+
metal::float4 _fragColor = {};
|
|
577
|
+
metal::float2 _uv_1 = {};
|
|
578
|
+
const auto _uv = varyings._uv;
|
|
579
|
+
_uv_1 = _uv;
|
|
580
|
+
main_1(_from, _sampler, _to, uniforms, _fragColor, _uv_1);
|
|
581
|
+
metal::float4 _e3 = _fragColor;
|
|
582
|
+
return main_Output { _e3 };
|
|
583
|
+
}
|