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,707 @@
|
|
|
1
|
+
// StereoViewer — MSL, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/StereoViewer.glsl
|
|
2
|
+
// Author: Ted Schundler
|
|
3
|
+
// License: BSD 2 Clause
|
|
4
|
+
// Description: Both images shrink into rounded cards that swap, like a stereo viewer toy
|
|
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 zoom;
|
|
17
|
+
float corner_radius;
|
|
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 _e32 = uv[0u];
|
|
26
|
+
float _e34 = uv[1u];
|
|
27
|
+
metal::float4 _e37 = _to.sample(_sampler, metal::float2(_e32, 1.0 - _e34), metal::level(0.0));
|
|
28
|
+
return _e37;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
bool in_corner(
|
|
32
|
+
thread metal::float2& p,
|
|
33
|
+
thread metal::float2& corner,
|
|
34
|
+
thread metal::float2& radius
|
|
35
|
+
) {
|
|
36
|
+
metal::float2 axis = {};
|
|
37
|
+
bool phi_156_ = {};
|
|
38
|
+
bool phi_168_ = {};
|
|
39
|
+
bool phi_169_ = {};
|
|
40
|
+
bool phi_177_ = {};
|
|
41
|
+
metal::float2 _e34 = corner;
|
|
42
|
+
metal::float2 _e36 = corner;
|
|
43
|
+
axis = (metal::float2(1.0, 1.0) - _e34) - _e36;
|
|
44
|
+
metal::float2 _e38 = p;
|
|
45
|
+
metal::float2 _e39 = corner;
|
|
46
|
+
metal::float2 _e40 = axis;
|
|
47
|
+
metal::float2 _e41 = radius;
|
|
48
|
+
p = _e38 - (_e39 + (_e40 * _e41));
|
|
49
|
+
metal::float2 _e45 = axis;
|
|
50
|
+
metal::float2 _e46 = radius;
|
|
51
|
+
metal::float2 _e48 = p;
|
|
52
|
+
p = _e48 * (_e45 / _e46);
|
|
53
|
+
float _e51 = p[0u];
|
|
54
|
+
bool _e52 = _e51 > 0.0;
|
|
55
|
+
phi_156_ = _e52;
|
|
56
|
+
if (_e52) {
|
|
57
|
+
float _e54 = p[1u];
|
|
58
|
+
phi_156_ = _e54 > -1.0;
|
|
59
|
+
}
|
|
60
|
+
bool _e57 = phi_156_;
|
|
61
|
+
phi_169_ = _e57;
|
|
62
|
+
if (!(_e57)) {
|
|
63
|
+
float _e60 = p[1u];
|
|
64
|
+
bool _e61 = _e60 > 0.0;
|
|
65
|
+
phi_168_ = _e61;
|
|
66
|
+
if (_e61) {
|
|
67
|
+
float _e63 = p[0u];
|
|
68
|
+
phi_168_ = _e63 > -1.0;
|
|
69
|
+
}
|
|
70
|
+
bool _e66 = phi_168_;
|
|
71
|
+
phi_169_ = _e66;
|
|
72
|
+
}
|
|
73
|
+
bool _e68 = phi_169_;
|
|
74
|
+
phi_177_ = _e68;
|
|
75
|
+
if (!(_e68)) {
|
|
76
|
+
metal::float2 _e70 = p;
|
|
77
|
+
metal::float2 _e71 = p;
|
|
78
|
+
phi_177_ = metal::dot(_e70, _e71) < 1.0;
|
|
79
|
+
}
|
|
80
|
+
bool _e75 = phi_177_;
|
|
81
|
+
return _e75;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
bool test_rounded_mask(
|
|
85
|
+
thread metal::float2& p_1,
|
|
86
|
+
thread metal::float2& corner_size
|
|
87
|
+
) {
|
|
88
|
+
metal::float2 param = {};
|
|
89
|
+
metal::float2 param_1 = {};
|
|
90
|
+
metal::float2 param_2 = {};
|
|
91
|
+
metal::float2 param_3 = {};
|
|
92
|
+
metal::float2 param_4 = {};
|
|
93
|
+
metal::float2 param_5 = {};
|
|
94
|
+
metal::float2 param_6 = {};
|
|
95
|
+
metal::float2 param_7 = {};
|
|
96
|
+
metal::float2 param_8 = {};
|
|
97
|
+
metal::float2 param_9 = {};
|
|
98
|
+
metal::float2 param_10 = {};
|
|
99
|
+
metal::float2 param_11 = {};
|
|
100
|
+
bool phi_196_ = {};
|
|
101
|
+
bool phi_206_ = {};
|
|
102
|
+
bool phi_215_ = {};
|
|
103
|
+
metal::float2 _e44 = p_1;
|
|
104
|
+
param = _e44;
|
|
105
|
+
param_1 = metal::float2(0.0, 0.0);
|
|
106
|
+
metal::float2 _e45 = corner_size;
|
|
107
|
+
param_2 = _e45;
|
|
108
|
+
bool _e46 = in_corner(param, param_1, param_2);
|
|
109
|
+
phi_196_ = _e46;
|
|
110
|
+
if (_e46) {
|
|
111
|
+
metal::float2 _e47 = p_1;
|
|
112
|
+
param_3 = _e47;
|
|
113
|
+
param_4 = metal::float2(0.0, 1.0);
|
|
114
|
+
metal::float2 _e48 = corner_size;
|
|
115
|
+
param_5 = _e48;
|
|
116
|
+
bool _e49 = in_corner(param_3, param_4, param_5);
|
|
117
|
+
phi_196_ = _e49;
|
|
118
|
+
}
|
|
119
|
+
bool _e51 = phi_196_;
|
|
120
|
+
phi_206_ = _e51;
|
|
121
|
+
if (_e51) {
|
|
122
|
+
metal::float2 _e52 = p_1;
|
|
123
|
+
param_6 = _e52;
|
|
124
|
+
param_7 = metal::float2(1.0, 0.0);
|
|
125
|
+
metal::float2 _e53 = corner_size;
|
|
126
|
+
param_8 = _e53;
|
|
127
|
+
bool _e54 = in_corner(param_6, param_7, param_8);
|
|
128
|
+
phi_206_ = _e54;
|
|
129
|
+
}
|
|
130
|
+
bool _e56 = phi_206_;
|
|
131
|
+
phi_215_ = _e56;
|
|
132
|
+
if (_e56) {
|
|
133
|
+
metal::float2 _e57 = p_1;
|
|
134
|
+
param_9 = _e57;
|
|
135
|
+
param_10 = metal::float2(1.0, 1.0);
|
|
136
|
+
metal::float2 _e58 = corner_size;
|
|
137
|
+
param_11 = _e58;
|
|
138
|
+
bool _e59 = in_corner(param_9, param_10, param_11);
|
|
139
|
+
phi_215_ = _e59;
|
|
140
|
+
}
|
|
141
|
+
bool _e61 = phi_215_;
|
|
142
|
+
return _e61;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
metal::float4 simple_sample_with_corners_to(
|
|
146
|
+
thread metal::float2& p_2,
|
|
147
|
+
thread metal::float2& corner_size_1,
|
|
148
|
+
thread float& zoom_amt,
|
|
149
|
+
metal::sampler _sampler,
|
|
150
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
151
|
+
constant Uniforms& uniforms
|
|
152
|
+
) {
|
|
153
|
+
metal::float2 param_12 = {};
|
|
154
|
+
metal::float2 param_13 = {};
|
|
155
|
+
metal::float2 param_14 = {};
|
|
156
|
+
metal::float2 _e36 = p_2;
|
|
157
|
+
float _e39 = zoom_amt;
|
|
158
|
+
float _e42 = uniforms.zoom;
|
|
159
|
+
float _e43 = zoom_amt;
|
|
160
|
+
p_2 = ((_e36 - metal::float2(0.5)) / metal::float2((1.0 - _e39) + (_e42 * _e43))) + metal::float2(0.5);
|
|
161
|
+
metal::float2 _e50 = p_2;
|
|
162
|
+
param_12 = _e50;
|
|
163
|
+
metal::float2 _e51 = corner_size_1;
|
|
164
|
+
param_13 = _e51;
|
|
165
|
+
bool _e52 = test_rounded_mask(param_12, param_13);
|
|
166
|
+
if (!(_e52)) {
|
|
167
|
+
return metal::float4(0.0, 0.0, 0.0, 1.0);
|
|
168
|
+
}
|
|
169
|
+
metal::float2 _e54 = p_2;
|
|
170
|
+
param_14 = _e54;
|
|
171
|
+
metal::float4 _e55 = getToColor(param_14, _sampler, _to);
|
|
172
|
+
return _e55;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
metal::float4 screen(
|
|
176
|
+
thread metal::float4& a,
|
|
177
|
+
thread metal::float4& b
|
|
178
|
+
) {
|
|
179
|
+
metal::float4 _e32 = a;
|
|
180
|
+
metal::float4 _e35 = b;
|
|
181
|
+
return metal::float4(1.0) - ((metal::float4(1.0) - _e32) * (metal::float4(1.0) - _e35));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
metal::float4 unscreen(
|
|
185
|
+
thread metal::float4& c
|
|
186
|
+
) {
|
|
187
|
+
metal::float4 _e31 = c;
|
|
188
|
+
return metal::float4(1.0) - metal::sqrt(metal::float4(1.0) - _e31);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
metal::float4 sample_with_corners_to(
|
|
192
|
+
thread metal::float2& p_3,
|
|
193
|
+
thread metal::float2& corner_size_2,
|
|
194
|
+
metal::sampler _sampler,
|
|
195
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
196
|
+
constant Uniforms& uniforms
|
|
197
|
+
) {
|
|
198
|
+
metal::float2 param_15 = {};
|
|
199
|
+
metal::float2 param_16 = {};
|
|
200
|
+
metal::float2 param_17 = {};
|
|
201
|
+
metal::float4 param_18 = {};
|
|
202
|
+
metal::float2 _e36 = p_3;
|
|
203
|
+
float _e40 = uniforms.zoom;
|
|
204
|
+
p_3 = ((_e36 - metal::float2(0.5)) / metal::float2(_e40)) + metal::float2(0.5);
|
|
205
|
+
metal::float2 _e45 = p_3;
|
|
206
|
+
param_15 = _e45;
|
|
207
|
+
metal::float2 _e46 = corner_size_2;
|
|
208
|
+
param_16 = _e46;
|
|
209
|
+
bool _e47 = test_rounded_mask(param_15, param_16);
|
|
210
|
+
if (!(_e47)) {
|
|
211
|
+
return metal::float4(0.0, 0.0, 0.0, 1.0);
|
|
212
|
+
}
|
|
213
|
+
metal::float2 _e49 = p_3;
|
|
214
|
+
param_17 = _e49;
|
|
215
|
+
metal::float4 _e50 = getToColor(param_17, _sampler, _to);
|
|
216
|
+
param_18 = _e50;
|
|
217
|
+
metal::float4 _e51 = unscreen(param_18);
|
|
218
|
+
return _e51;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
metal::float3x3 rotate2d(
|
|
222
|
+
thread float& angle,
|
|
223
|
+
thread float& ratio
|
|
224
|
+
) {
|
|
225
|
+
float s = {};
|
|
226
|
+
float c_1 = {};
|
|
227
|
+
float _e34 = angle;
|
|
228
|
+
s = metal::sin(_e34);
|
|
229
|
+
float _e36 = angle;
|
|
230
|
+
c_1 = metal::cos(_e36);
|
|
231
|
+
float _e38 = c_1;
|
|
232
|
+
float _e39 = s;
|
|
233
|
+
float _e40 = s;
|
|
234
|
+
float _e42 = c_1;
|
|
235
|
+
return metal::float3x3(metal::float3(_e38, _e39, 0.0), metal::float3(-(_e40), _e42, 0.0), metal::float3(0.0, 0.0, 1.0));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
metal::float3x3 scale2d(
|
|
239
|
+
thread float& x,
|
|
240
|
+
thread float& y
|
|
241
|
+
) {
|
|
242
|
+
float _e32 = x;
|
|
243
|
+
float _e33 = y;
|
|
244
|
+
return metal::float3x3(metal::float3(_e32, 0.0, 0.0), metal::float3(0.0, _e33, 0.0), metal::float3(0.0, 0.0, 1.0));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
metal::float3x3 translate2d(
|
|
248
|
+
thread float& x_1,
|
|
249
|
+
thread float& y_1
|
|
250
|
+
) {
|
|
251
|
+
float _e32 = x_1;
|
|
252
|
+
float _e34 = y_1;
|
|
253
|
+
return metal::float3x3(metal::float3(1.0, 0.0, 0.0), metal::float3(0.0, 1.0, 0.0), metal::float3(-(_e32), -(_e34), 1.0));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
metal::float4 get_cross_masked(
|
|
257
|
+
thread metal::float3& p3_,
|
|
258
|
+
thread float& angle_1,
|
|
259
|
+
thread metal::float2& corner_size_3,
|
|
260
|
+
thread float& ratio_1,
|
|
261
|
+
metal::sampler _sampler,
|
|
262
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
263
|
+
constant Uniforms& uniforms
|
|
264
|
+
) {
|
|
265
|
+
metal::float3x3 center_and_scale = {};
|
|
266
|
+
float param_19 = {};
|
|
267
|
+
float param_20 = {};
|
|
268
|
+
float param_21 = {};
|
|
269
|
+
float param_22 = {};
|
|
270
|
+
metal::float3x3 unscale_and_uncenter = {};
|
|
271
|
+
float param_23 = {};
|
|
272
|
+
float param_24 = {};
|
|
273
|
+
float param_25 = {};
|
|
274
|
+
float param_26 = {};
|
|
275
|
+
metal::float3x3 slide_left = {};
|
|
276
|
+
float param_27 = {};
|
|
277
|
+
float param_28 = {};
|
|
278
|
+
metal::float3x3 slide_right = {};
|
|
279
|
+
float param_29 = {};
|
|
280
|
+
float param_30 = {};
|
|
281
|
+
metal::float3x3 rotate = {};
|
|
282
|
+
float param_31 = {};
|
|
283
|
+
float param_32 = {};
|
|
284
|
+
metal::float3x3 op_a = {};
|
|
285
|
+
metal::float3x3 op_b = {};
|
|
286
|
+
bool mask_a = {};
|
|
287
|
+
metal::float2 param_33 = {};
|
|
288
|
+
metal::float2 param_34 = {};
|
|
289
|
+
bool mask_b = {};
|
|
290
|
+
metal::float2 param_35 = {};
|
|
291
|
+
metal::float2 param_36 = {};
|
|
292
|
+
metal::float4 img = {};
|
|
293
|
+
metal::float2 param_37 = {};
|
|
294
|
+
metal::float2 param_38 = {};
|
|
295
|
+
metal::float4 param_39 = {};
|
|
296
|
+
metal::float4 param_40 = {};
|
|
297
|
+
float _e66 = angle_1;
|
|
298
|
+
angle_1 = 1.0 - _e66;
|
|
299
|
+
float _e68 = angle_1;
|
|
300
|
+
float _e69 = angle_1;
|
|
301
|
+
angle_1 = _e68 * _e69;
|
|
302
|
+
float _e71 = angle_1;
|
|
303
|
+
angle_1 = _e71 / 2.4;
|
|
304
|
+
param_19 = -0.5;
|
|
305
|
+
param_20 = -0.5;
|
|
306
|
+
metal::float3x3 _e73 = translate2d(param_19, param_20);
|
|
307
|
+
param_21 = 1.0;
|
|
308
|
+
float _e74 = ratio_1;
|
|
309
|
+
param_22 = _e74;
|
|
310
|
+
metal::float3x3 _e75 = scale2d(param_21, param_22);
|
|
311
|
+
center_and_scale = _e73 * _e75;
|
|
312
|
+
float _e78 = uniforms.zoom;
|
|
313
|
+
float _e81 = uniforms.zoom;
|
|
314
|
+
float _e82 = ratio_1;
|
|
315
|
+
param_23 = 1.0 / _e78;
|
|
316
|
+
param_24 = 1.0 / (_e81 * _e82);
|
|
317
|
+
metal::float3x3 _e85 = scale2d(param_23, param_24);
|
|
318
|
+
param_25 = 0.5;
|
|
319
|
+
param_26 = 0.5;
|
|
320
|
+
metal::float3x3 _e86 = translate2d(param_25, param_26);
|
|
321
|
+
unscale_and_uncenter = _e85 * _e86;
|
|
322
|
+
param_27 = -2.0;
|
|
323
|
+
param_28 = 0.0;
|
|
324
|
+
metal::float3x3 _e88 = translate2d(param_27, param_28);
|
|
325
|
+
slide_left = _e88;
|
|
326
|
+
param_29 = 2.0;
|
|
327
|
+
param_30 = 0.0;
|
|
328
|
+
metal::float3x3 _e89 = translate2d(param_29, param_30);
|
|
329
|
+
slide_right = _e89;
|
|
330
|
+
float _e90 = angle_1;
|
|
331
|
+
param_31 = _e90;
|
|
332
|
+
float _e91 = ratio_1;
|
|
333
|
+
param_32 = _e91;
|
|
334
|
+
metal::float3x3 _e92 = rotate2d(param_31, param_32);
|
|
335
|
+
rotate = _e92;
|
|
336
|
+
metal::float3x3 _e93 = center_and_scale;
|
|
337
|
+
metal::float3x3 _e94 = slide_right;
|
|
338
|
+
metal::float3x3 _e96 = rotate;
|
|
339
|
+
metal::float3x3 _e98 = slide_left;
|
|
340
|
+
metal::float3x3 _e100 = unscale_and_uncenter;
|
|
341
|
+
op_a = (((_e93 * _e94) * _e96) * _e98) * _e100;
|
|
342
|
+
metal::float3x3 _e102 = center_and_scale;
|
|
343
|
+
metal::float3x3 _e103 = slide_left;
|
|
344
|
+
metal::float3x3 _e105 = rotate;
|
|
345
|
+
metal::float3x3 _e107 = slide_right;
|
|
346
|
+
metal::float3x3 _e109 = unscale_and_uncenter;
|
|
347
|
+
op_b = (((_e102 * _e103) * _e105) * _e107) * _e109;
|
|
348
|
+
metal::float3x3 _e111 = op_a;
|
|
349
|
+
metal::float3 _e112 = p3_;
|
|
350
|
+
param_33 = (_e111 * _e112).xy;
|
|
351
|
+
metal::float2 _e115 = corner_size_3;
|
|
352
|
+
param_34 = _e115;
|
|
353
|
+
bool _e116 = test_rounded_mask(param_33, param_34);
|
|
354
|
+
mask_a = _e116;
|
|
355
|
+
metal::float3x3 _e117 = op_b;
|
|
356
|
+
metal::float3 _e118 = p3_;
|
|
357
|
+
param_35 = (_e117 * _e118).xy;
|
|
358
|
+
metal::float2 _e121 = corner_size_3;
|
|
359
|
+
param_36 = _e121;
|
|
360
|
+
bool _e122 = test_rounded_mask(param_35, param_36);
|
|
361
|
+
mask_b = _e122;
|
|
362
|
+
bool _e123 = mask_a;
|
|
363
|
+
bool _e124 = mask_b;
|
|
364
|
+
if (_e123 || _e124) {
|
|
365
|
+
metal::float3 _e126 = p3_;
|
|
366
|
+
param_37 = _e126.xy;
|
|
367
|
+
metal::float2 _e128 = corner_size_3;
|
|
368
|
+
param_38 = _e128;
|
|
369
|
+
metal::float4 _e129 = sample_with_corners_to(param_37, param_38, _sampler, _to, uniforms);
|
|
370
|
+
img = _e129;
|
|
371
|
+
bool _e130 = mask_a;
|
|
372
|
+
metal::float4 _e131 = img;
|
|
373
|
+
bool _e134 = mask_b;
|
|
374
|
+
metal::float4 _e135 = img;
|
|
375
|
+
param_39 = metal::select(metal::float4(0.0, 0.0, 0.0, 1.0), _e131, metal::bool4(_e130));
|
|
376
|
+
param_40 = metal::select(metal::float4(0.0, 0.0, 0.0, 1.0), _e135, metal::bool4(_e134));
|
|
377
|
+
metal::float4 _e138 = screen(param_39, param_40);
|
|
378
|
+
return _e138;
|
|
379
|
+
} else {
|
|
380
|
+
return metal::float4(0.0, 0.0, 0.0, 1.0);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
metal::float4 getFromColor(
|
|
385
|
+
thread metal::float2& uv_1,
|
|
386
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
387
|
+
metal::sampler _sampler
|
|
388
|
+
) {
|
|
389
|
+
float _e32 = uv_1[0u];
|
|
390
|
+
float _e34 = uv_1[1u];
|
|
391
|
+
metal::float4 _e37 = _from.sample(_sampler, metal::float2(_e32, 1.0 - _e34), metal::level(0.0));
|
|
392
|
+
return _e37;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
metal::float4 sample_with_corners_from(
|
|
396
|
+
thread metal::float2& p_4,
|
|
397
|
+
thread metal::float2& corner_size_4,
|
|
398
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
399
|
+
metal::sampler _sampler,
|
|
400
|
+
constant Uniforms& uniforms
|
|
401
|
+
) {
|
|
402
|
+
metal::float2 param_41 = {};
|
|
403
|
+
metal::float2 param_42 = {};
|
|
404
|
+
metal::float2 param_43 = {};
|
|
405
|
+
metal::float4 param_44 = {};
|
|
406
|
+
metal::float2 _e36 = p_4;
|
|
407
|
+
float _e40 = uniforms.zoom;
|
|
408
|
+
p_4 = ((_e36 - metal::float2(0.5)) / metal::float2(_e40)) + metal::float2(0.5);
|
|
409
|
+
metal::float2 _e45 = p_4;
|
|
410
|
+
param_41 = _e45;
|
|
411
|
+
metal::float2 _e46 = corner_size_4;
|
|
412
|
+
param_42 = _e46;
|
|
413
|
+
bool _e47 = test_rounded_mask(param_41, param_42);
|
|
414
|
+
if (!(_e47)) {
|
|
415
|
+
return metal::float4(0.0, 0.0, 0.0, 1.0);
|
|
416
|
+
}
|
|
417
|
+
metal::float2 _e49 = p_4;
|
|
418
|
+
param_43 = _e49;
|
|
419
|
+
metal::float4 _e50 = getFromColor(param_43, _from, _sampler);
|
|
420
|
+
param_44 = _e50;
|
|
421
|
+
metal::float4 _e51 = unscreen(param_44);
|
|
422
|
+
return _e51;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
metal::float4 get_cross_rotated(
|
|
426
|
+
thread metal::float3& p3_1,
|
|
427
|
+
thread float& angle_2,
|
|
428
|
+
thread metal::float2& corner_size_5,
|
|
429
|
+
thread float& ratio_2,
|
|
430
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
431
|
+
metal::sampler _sampler,
|
|
432
|
+
constant Uniforms& uniforms
|
|
433
|
+
) {
|
|
434
|
+
metal::float3x3 center_and_scale_1 = {};
|
|
435
|
+
float param_45 = {};
|
|
436
|
+
float param_46 = {};
|
|
437
|
+
float param_47 = {};
|
|
438
|
+
float param_48 = {};
|
|
439
|
+
metal::float3x3 unscale_and_uncenter_1 = {};
|
|
440
|
+
float param_49 = {};
|
|
441
|
+
float param_50 = {};
|
|
442
|
+
float param_51 = {};
|
|
443
|
+
float param_52 = {};
|
|
444
|
+
metal::float3x3 slide_left_1 = {};
|
|
445
|
+
float param_53 = {};
|
|
446
|
+
float param_54 = {};
|
|
447
|
+
metal::float3x3 slide_right_1 = {};
|
|
448
|
+
float param_55 = {};
|
|
449
|
+
float param_56 = {};
|
|
450
|
+
metal::float3x3 rotate_1 = {};
|
|
451
|
+
float param_57 = {};
|
|
452
|
+
float param_58 = {};
|
|
453
|
+
metal::float3x3 op_a_1 = {};
|
|
454
|
+
metal::float3x3 op_b_1 = {};
|
|
455
|
+
metal::float4 a_1 = {};
|
|
456
|
+
metal::float2 param_59 = {};
|
|
457
|
+
metal::float2 param_60 = {};
|
|
458
|
+
metal::float4 b_1 = {};
|
|
459
|
+
metal::float2 param_61 = {};
|
|
460
|
+
metal::float2 param_62 = {};
|
|
461
|
+
metal::float4 param_63 = {};
|
|
462
|
+
metal::float4 param_64 = {};
|
|
463
|
+
float _e63 = angle_2;
|
|
464
|
+
float _e64 = angle_2;
|
|
465
|
+
angle_2 = _e63 * _e64;
|
|
466
|
+
float _e66 = angle_2;
|
|
467
|
+
angle_2 = _e66 / 2.4;
|
|
468
|
+
param_45 = -0.5;
|
|
469
|
+
param_46 = -0.5;
|
|
470
|
+
metal::float3x3 _e68 = translate2d(param_45, param_46);
|
|
471
|
+
param_47 = 1.0;
|
|
472
|
+
float _e69 = ratio_2;
|
|
473
|
+
param_48 = _e69;
|
|
474
|
+
metal::float3x3 _e70 = scale2d(param_47, param_48);
|
|
475
|
+
center_and_scale_1 = _e68 * _e70;
|
|
476
|
+
float _e72 = ratio_2;
|
|
477
|
+
param_49 = 1.0;
|
|
478
|
+
param_50 = 1.0 / _e72;
|
|
479
|
+
metal::float3x3 _e74 = scale2d(param_49, param_50);
|
|
480
|
+
param_51 = 0.5;
|
|
481
|
+
param_52 = 0.5;
|
|
482
|
+
metal::float3x3 _e75 = translate2d(param_51, param_52);
|
|
483
|
+
unscale_and_uncenter_1 = _e74 * _e75;
|
|
484
|
+
param_53 = -2.0;
|
|
485
|
+
param_54 = 0.0;
|
|
486
|
+
metal::float3x3 _e77 = translate2d(param_53, param_54);
|
|
487
|
+
slide_left_1 = _e77;
|
|
488
|
+
param_55 = 2.0;
|
|
489
|
+
param_56 = 0.0;
|
|
490
|
+
metal::float3x3 _e78 = translate2d(param_55, param_56);
|
|
491
|
+
slide_right_1 = _e78;
|
|
492
|
+
float _e79 = angle_2;
|
|
493
|
+
param_57 = _e79;
|
|
494
|
+
float _e80 = ratio_2;
|
|
495
|
+
param_58 = _e80;
|
|
496
|
+
metal::float3x3 _e81 = rotate2d(param_57, param_58);
|
|
497
|
+
rotate_1 = _e81;
|
|
498
|
+
metal::float3x3 _e82 = center_and_scale_1;
|
|
499
|
+
metal::float3x3 _e83 = slide_right_1;
|
|
500
|
+
metal::float3x3 _e85 = rotate_1;
|
|
501
|
+
metal::float3x3 _e87 = slide_left_1;
|
|
502
|
+
metal::float3x3 _e89 = unscale_and_uncenter_1;
|
|
503
|
+
op_a_1 = (((_e82 * _e83) * _e85) * _e87) * _e89;
|
|
504
|
+
metal::float3x3 _e91 = center_and_scale_1;
|
|
505
|
+
metal::float3x3 _e92 = slide_left_1;
|
|
506
|
+
metal::float3x3 _e94 = rotate_1;
|
|
507
|
+
metal::float3x3 _e96 = slide_right_1;
|
|
508
|
+
metal::float3x3 _e98 = unscale_and_uncenter_1;
|
|
509
|
+
op_b_1 = (((_e91 * _e92) * _e94) * _e96) * _e98;
|
|
510
|
+
metal::float3x3 _e100 = op_a_1;
|
|
511
|
+
metal::float3 _e101 = p3_1;
|
|
512
|
+
param_59 = (_e100 * _e101).xy;
|
|
513
|
+
metal::float2 _e104 = corner_size_5;
|
|
514
|
+
param_60 = _e104;
|
|
515
|
+
metal::float4 _e105 = sample_with_corners_from(param_59, param_60, _from, _sampler, uniforms);
|
|
516
|
+
a_1 = _e105;
|
|
517
|
+
metal::float3x3 _e106 = op_b_1;
|
|
518
|
+
metal::float3 _e107 = p3_1;
|
|
519
|
+
param_61 = (_e106 * _e107).xy;
|
|
520
|
+
metal::float2 _e110 = corner_size_5;
|
|
521
|
+
param_62 = _e110;
|
|
522
|
+
metal::float4 _e111 = sample_with_corners_from(param_61, param_62, _from, _sampler, uniforms);
|
|
523
|
+
b_1 = _e111;
|
|
524
|
+
metal::float4 _e112 = a_1;
|
|
525
|
+
param_63 = _e112;
|
|
526
|
+
metal::float4 _e113 = b_1;
|
|
527
|
+
param_64 = _e113;
|
|
528
|
+
metal::float4 _e114 = screen(param_63, param_64);
|
|
529
|
+
return _e114;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
metal::float4 simple_sample_with_corners_from(
|
|
533
|
+
thread metal::float2& p_5,
|
|
534
|
+
thread metal::float2& corner_size_6,
|
|
535
|
+
thread float& zoom_amt_1,
|
|
536
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
537
|
+
metal::sampler _sampler,
|
|
538
|
+
constant Uniforms& uniforms
|
|
539
|
+
) {
|
|
540
|
+
metal::float2 param_65 = {};
|
|
541
|
+
metal::float2 param_66 = {};
|
|
542
|
+
metal::float2 param_67 = {};
|
|
543
|
+
metal::float2 _e36 = p_5;
|
|
544
|
+
float _e39 = zoom_amt_1;
|
|
545
|
+
float _e42 = uniforms.zoom;
|
|
546
|
+
float _e43 = zoom_amt_1;
|
|
547
|
+
p_5 = ((_e36 - metal::float2(0.5)) / metal::float2((1.0 - _e39) + (_e42 * _e43))) + metal::float2(0.5);
|
|
548
|
+
metal::float2 _e50 = p_5;
|
|
549
|
+
param_65 = _e50;
|
|
550
|
+
metal::float2 _e51 = corner_size_6;
|
|
551
|
+
param_66 = _e51;
|
|
552
|
+
bool _e52 = test_rounded_mask(param_65, param_66);
|
|
553
|
+
if (!(_e52)) {
|
|
554
|
+
return metal::float4(0.0, 0.0, 0.0, 1.0);
|
|
555
|
+
}
|
|
556
|
+
metal::float2 _e54 = p_5;
|
|
557
|
+
param_67 = _e54;
|
|
558
|
+
metal::float4 _e55 = getFromColor(param_67, _from, _sampler);
|
|
559
|
+
return _e55;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
metal::float4 transition(
|
|
563
|
+
thread metal::float2& uv_2,
|
|
564
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
565
|
+
metal::sampler _sampler,
|
|
566
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
567
|
+
constant Uniforms& uniforms
|
|
568
|
+
) {
|
|
569
|
+
metal::float2 p_6 = {};
|
|
570
|
+
metal::float3 p3_2 = {};
|
|
571
|
+
metal::float2 corner_size_7 = {};
|
|
572
|
+
metal::float2 param_68 = {};
|
|
573
|
+
float a_2 = {};
|
|
574
|
+
metal::float2 param_69 = {};
|
|
575
|
+
metal::float2 param_70 = {};
|
|
576
|
+
float param_71 = {};
|
|
577
|
+
metal::float3 param_72 = {};
|
|
578
|
+
float param_73 = {};
|
|
579
|
+
metal::float2 param_74 = {};
|
|
580
|
+
float param_75 = {};
|
|
581
|
+
metal::float3 param_76 = {};
|
|
582
|
+
float param_77 = {};
|
|
583
|
+
metal::float2 param_78 = {};
|
|
584
|
+
float param_79 = {};
|
|
585
|
+
metal::float2 param_80 = {};
|
|
586
|
+
metal::float2 param_81 = {};
|
|
587
|
+
float param_82 = {};
|
|
588
|
+
metal::float2 param_83 = {};
|
|
589
|
+
metal::float2 _e51 = uv_2;
|
|
590
|
+
p_6 = _e51 / metal::float2(1.0, 1.0);
|
|
591
|
+
metal::float2 _e53 = p_6;
|
|
592
|
+
p3_2 = metal::float3(_e53.x, _e53.y, 1.0);
|
|
593
|
+
float _e58 = uniforms.corner_radius;
|
|
594
|
+
float _e60 = uniforms.ratio;
|
|
595
|
+
float _e63 = uniforms.corner_radius;
|
|
596
|
+
corner_size_7 = metal::float2(_e58 / _e60, _e63);
|
|
597
|
+
float _e66 = uniforms.progress;
|
|
598
|
+
if (_e66 <= 0.0) {
|
|
599
|
+
metal::float2 _e68 = p_6;
|
|
600
|
+
param_68 = _e68;
|
|
601
|
+
metal::float4 _e69 = getFromColor(param_68, _from, _sampler);
|
|
602
|
+
return _e69;
|
|
603
|
+
} else {
|
|
604
|
+
float _e71 = uniforms.progress;
|
|
605
|
+
if (_e71 < 0.1) {
|
|
606
|
+
float _e74 = uniforms.progress;
|
|
607
|
+
a_2 = _e74 / 0.1;
|
|
608
|
+
metal::float2 _e76 = corner_size_7;
|
|
609
|
+
float _e77 = a_2;
|
|
610
|
+
metal::float2 _e79 = p_6;
|
|
611
|
+
param_69 = _e79;
|
|
612
|
+
param_70 = _e76 * _e77;
|
|
613
|
+
float _e80 = a_2;
|
|
614
|
+
param_71 = _e80;
|
|
615
|
+
metal::float4 _e81 = simple_sample_with_corners_from(param_69, param_70, param_71, _from, _sampler, uniforms);
|
|
616
|
+
return _e81;
|
|
617
|
+
} else {
|
|
618
|
+
float _e83 = uniforms.progress;
|
|
619
|
+
if (_e83 < 0.48) {
|
|
620
|
+
float _e86 = uniforms.progress;
|
|
621
|
+
a_2 = (_e86 - 0.1) / 0.38;
|
|
622
|
+
metal::float3 _e89 = p3_2;
|
|
623
|
+
param_72 = _e89;
|
|
624
|
+
float _e90 = a_2;
|
|
625
|
+
param_73 = _e90;
|
|
626
|
+
metal::float2 _e91 = corner_size_7;
|
|
627
|
+
param_74 = _e91;
|
|
628
|
+
float _e93 = uniforms.ratio;
|
|
629
|
+
param_75 = _e93;
|
|
630
|
+
metal::float4 _e94 = get_cross_rotated(param_72, param_73, param_74, param_75, _from, _sampler, uniforms);
|
|
631
|
+
return _e94;
|
|
632
|
+
} else {
|
|
633
|
+
float _e96 = uniforms.progress;
|
|
634
|
+
if (_e96 < 0.9) {
|
|
635
|
+
float _e99 = uniforms.progress;
|
|
636
|
+
metal::float3 _e102 = p3_2;
|
|
637
|
+
param_76 = _e102;
|
|
638
|
+
param_77 = (_e99 - 0.52) / 0.38;
|
|
639
|
+
metal::float2 _e103 = corner_size_7;
|
|
640
|
+
param_78 = _e103;
|
|
641
|
+
float _e105 = uniforms.ratio;
|
|
642
|
+
param_79 = _e105;
|
|
643
|
+
metal::float4 _e106 = get_cross_masked(param_76, param_77, param_78, param_79, _sampler, _to, uniforms);
|
|
644
|
+
return _e106;
|
|
645
|
+
} else {
|
|
646
|
+
float _e108 = uniforms.progress;
|
|
647
|
+
if (_e108 < 1.0) {
|
|
648
|
+
float _e111 = uniforms.progress;
|
|
649
|
+
a_2 = (1.0 - _e111) / 0.1;
|
|
650
|
+
metal::float2 _e114 = corner_size_7;
|
|
651
|
+
float _e115 = a_2;
|
|
652
|
+
metal::float2 _e117 = p_6;
|
|
653
|
+
param_80 = _e117;
|
|
654
|
+
param_81 = _e114 * _e115;
|
|
655
|
+
float _e118 = a_2;
|
|
656
|
+
param_82 = _e118;
|
|
657
|
+
metal::float4 _e119 = simple_sample_with_corners_to(param_80, param_81, param_82, _sampler, _to, uniforms);
|
|
658
|
+
return _e119;
|
|
659
|
+
} else {
|
|
660
|
+
metal::float2 _e120 = p_6;
|
|
661
|
+
param_83 = _e120;
|
|
662
|
+
metal::float4 _e121 = getToColor(param_83, _sampler, _to);
|
|
663
|
+
return _e121;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
void main_1(
|
|
672
|
+
metal::texture2d<float, metal::access::sample> _from,
|
|
673
|
+
metal::sampler _sampler,
|
|
674
|
+
metal::texture2d<float, metal::access::sample> _to,
|
|
675
|
+
constant Uniforms& uniforms,
|
|
676
|
+
thread metal::float4& _fragColor,
|
|
677
|
+
thread metal::float2& _uv_1
|
|
678
|
+
) {
|
|
679
|
+
metal::float2 param_84 = {};
|
|
680
|
+
metal::float2 _e31 = _uv_1;
|
|
681
|
+
param_84 = _e31;
|
|
682
|
+
metal::float4 _e32 = transition(param_84, _from, _sampler, _to, uniforms);
|
|
683
|
+
_fragColor = _e32;
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
struct main_Input {
|
|
688
|
+
metal::float2 _uv [[user(loc0), center_perspective]];
|
|
689
|
+
};
|
|
690
|
+
struct main_Output {
|
|
691
|
+
metal::float4 member [[color(0)]];
|
|
692
|
+
};
|
|
693
|
+
fragment main_Output main_(
|
|
694
|
+
main_Input varyings [[stage_in]]
|
|
695
|
+
, metal::texture2d<float, metal::access::sample> _from [[texture(0)]]
|
|
696
|
+
, metal::sampler _sampler [[sampler(0)]]
|
|
697
|
+
, metal::texture2d<float, metal::access::sample> _to [[texture(1)]]
|
|
698
|
+
, constant Uniforms& uniforms [[buffer(0)]]
|
|
699
|
+
) {
|
|
700
|
+
metal::float4 _fragColor = {};
|
|
701
|
+
metal::float2 _uv_1 = {};
|
|
702
|
+
const auto _uv = varyings._uv;
|
|
703
|
+
_uv_1 = _uv;
|
|
704
|
+
main_1(_from, _sampler, _to, uniforms, _fragColor, _uv_1);
|
|
705
|
+
metal::float4 _e3 = _fragColor;
|
|
706
|
+
return main_Output { _e3 };
|
|
707
|
+
}
|