shaders 3.0.449 → 3.0.451
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/dist/cli.js +2 -2
- package/dist/core/{AngularBlur-DU1WmNHt.js → AngularBlur-4jt7bNoF.js} +1 -1
- package/dist/core/{Arc-C8QmYsiZ.js → Arc-DXIfbBgd.js} +2 -2
- package/dist/core/{Ascii-BaQ6MZTc.js → Ascii-GDof03Ca.js} +1 -1
- package/dist/core/{Aurora-B6lOg6M4.js → Aurora-CS4vewUW.js} +3 -3
- package/dist/core/{BarShift-CFK-CzF9.js → BarShift-BtnYLQ0B.js} +2 -2
- package/dist/core/{BarnDoors-DWs_0xtH.js → BarnDoors-Dw9K-amf.js} +1 -1
- package/dist/core/{Beam-Cgc4EYnj.js → Beam-D_cyaMjJ.js} +1 -1
- package/dist/core/{Bend-oof5pE1H.js → Bend-CSs5UIh8.js} +1 -1
- package/dist/core/{Blob-cfvDCv0i.js → Blob-h25zA5WH.js} +2 -2
- package/dist/core/{BlockDissolve-C7yJzYGZ.js → BlockDissolve-CKN_KvLP.js} +2 -2
- package/dist/core/{BlockNoise-DaM9YDAH.js → BlockNoise-DhKyd_F7.js} +5 -5
- package/dist/core/{BlueNoise-BMMRTsMw.js → BlueNoise-Auhzq4x5.js} +4 -4
- package/dist/core/{Blur-Be7sX4v9.js → Blur-CcxMqYsu.js} +3 -3
- package/dist/core/{Boids-C9S69THK.js → Boids-D51U46GF.js} +783 -656
- package/dist/core/{BokehBlur-DSkKZ_yy.js → BokehBlur-Cfaqbh3I.js} +3 -3
- package/dist/core/{BrickPattern-BY7h4hyx.js → BrickPattern-tASwilX0.js} +2 -2
- package/dist/core/{BrightnessContrast-DFc0gSUv.js → BrightnessContrast-ZCKqJW7i.js} +1 -1
- package/dist/core/{BrushedMetal-B06tUygH.js → BrushedMetal-B6gSVB28.js} +6 -6
- package/dist/core/{Bulge-BpSOQfH0.js → Bulge-dCYtWP4S.js} +1 -1
- package/dist/core/{CRTScreen-DdGcEvk2.js → CRTScreen-CVY1lOGL.js} +1 -1
- package/dist/core/{CarbonFiber-Dy7Osb3V.js → CarbonFiber-Do9EONKv.js} +5 -5
- package/dist/core/{Chalkboard-wRYj23wL.js → Chalkboard-0hyyGnYl.js} +1 -1
- package/dist/core/{ChannelBlur-DKD9GUpc.js → ChannelBlur-DcZKCKXi.js} +2 -2
- package/dist/core/{CheckerWipe-D0WmsSKg.js → CheckerWipe-BIE62tJ1.js} +1 -1
- package/dist/core/{Checkerboard-2sQYJks9.js → Checkerboard-CRnfu63u.js} +1 -1
- package/dist/core/{Chevron-D3oPw2-i.js → Chevron-Ld_v4z9T.js} +2 -2
- package/dist/core/{ChromaFlow-px9KG_h6.js → ChromaFlow-CTWeauIr.js} +1 -1
- package/dist/core/{ChromaticAberration-DLFROPJV.js → ChromaticAberration-CxuOb68m.js} +1 -1
- package/dist/core/{Circle-0CqIPN3a.js → Circle-XP1B5rsN.js} +2 -2
- package/dist/core/{ColorWheel-CMtn8slz.js → ColorWheel-CFU_OmOW.js} +2 -2
- package/dist/core/{CompressionArtifacts-D7dpVg47.js → CompressionArtifacts-Bc9xTdQP.js} +2 -2
- package/dist/core/{ConcentricSpin-BPk-_egF.js → ConcentricSpin-DTJytpAk.js} +2 -2
- package/dist/core/{ConicGradient-B-tEhmfR.js → ConicGradient-C-4uDmQj.js} +2 -2
- package/dist/core/{ContourLines-BlgCWFSy.js → ContourLines-C8p6f-1y.js} +1 -1
- package/dist/core/{CornerPin-DB3G2i_y.js → CornerPin-CB92kX10.js} +1 -1
- package/dist/core/{Crescent-CFzPQKll.js → Crescent-Dk4nlG8T.js} +2 -2
- package/dist/core/{Cross-Cstl9nDg.js → Cross-DsnI1U8g.js} +2 -2
- package/dist/core/{Crystal-CEeqF1Xa.js → Crystal-CR_sG2y7.js} +5 -5
- package/dist/core/{CurlNoise-uvTKk4Wa.js → CurlNoise-DJ27ih0F.js} +5 -5
- package/dist/core/{CursorRipples-B46VApbY.js → CursorRipples-CuO3sZga.js} +2 -2
- package/dist/core/{CursorTrail-DzYRTzzA.js → CursorTrail-d4xx4QpM.js} +3 -3
- package/dist/core/{DataMosh-Ysev5-c_.js → DataMosh-BhvE-2yC.js} +2 -2
- package/dist/core/{DiamondGradient-pTOwPuAl.js → DiamondGradient-CtOVKrYf.js} +2 -2
- package/dist/core/{DiamondWipe-D6u1P2xH.js → DiamondWipe-D-yiQBVj.js} +1 -1
- package/dist/core/{DiffuseBlur-BX0cfwyh.js → DiffuseBlur-BDf-Czxz.js} +1 -1
- package/dist/core/{DisplacementMap-DMNivtcV.js → DisplacementMap-B_jf_2lj.js} +1 -1
- package/dist/core/{Dither-Cxu-hSc_.js → Dither-D3P6EJU8.js} +1 -1
- package/dist/core/{DotGrid-CbNHebie.js → DotGrid-BnSVhJlh.js} +2 -2
- package/dist/core/{DropShadow-DFyuEA17.js → DropShadow-BSKVH3n3.js} +1 -1
- package/dist/core/{Duotone-CgueO-jZ.js → Duotone-DfjYuK2u.js} +1 -1
- package/dist/core/{Ellipse-DxRnSw__.js → Ellipse-D7_1QKaa.js} +2 -2
- package/dist/core/{Emboss-BJxzjZmZ.js → Emboss-ZiPslqzl.js} +4 -4
- package/dist/core/{Engraving-DmQCj8vU.js → Engraving-DsfkKajz.js} +2 -2
- package/dist/core/{ErosionNoise-7ekcAfBb.js → ErosionNoise-SELArv9H.js} +4 -4
- package/dist/core/{Exposure-avEereLn.js → Exposure-A7WlTOti.js} +1 -1
- package/dist/core/{FallingLines-BINyHi3N.js → FallingLines-9PRMb_Ou.js} +2 -2
- package/dist/core/{FilmGrain-B-pZBxiK.js → FilmGrain-SXzVDesw.js} +1 -1
- package/dist/core/{FilmStock-BJfso8f3.js → FilmStock-RK4fk4m0.js} +3 -3
- package/dist/core/{Flip-Dbwe0zh8.js → Flip-DjoNWG4v.js} +1 -1
- package/dist/core/{FloatingParticles-CoQ01il5.js → FloatingParticles-D7vUF5g7.js} +550 -367
- package/dist/core/{FlowField-CU6S3Jar.js → FlowField-tHrXhd1b.js} +3 -3
- package/dist/core/{Flower-R7HIopNH.js → Flower-BfehbmmG.js} +2 -2
- package/dist/core/{FlowingGradient-D66Y9Wgq.js → FlowingGradient-BTKjkx5F.js} +3 -3
- package/dist/core/{FlutedGlass-WAaeW92l.js → FlutedGlass-uFT7iy_9.js} +2 -2
- package/dist/core/{Fog-BChoF6fi.js → Fog-Cu1CMATa.js} +2 -2
- package/dist/core/{Form3D-DajWNpAi.js → Form3D-D0ji-MeC.js} +2 -2
- package/dist/core/{FractalNoise-DIrQ3eQj.js → FractalNoise-D9HYiOdr.js} +4 -4
- package/dist/core/{Frost-B_3JSI2H.js → Frost-DQZZxdTk.js} +6 -6
- package/dist/core/{GaborNoise-4FWeA9yr.js → GaborNoise-D7BP0K4g.js} +5 -5
- package/dist/core/{Glass-wOhmSf3v.js → Glass-CzCVnGn-.js} +5 -5
- package/dist/core/{GlassTiles-DgdAiEuy.js → GlassTiles-DJzPPqwz.js} +1 -1
- package/dist/core/{Glitch-BOiywFUR.js → Glitch-D1Dx8__X.js} +28 -11
- package/dist/core/{Glow-C2cEWdNE.js → Glow-Bd9_o_Kv.js} +3 -3
- package/dist/core/{Godrays-DAZB2GSn.js → Godrays-DRPRWGPm.js} +2 -2
- package/dist/core/{Goo-B_WAqWYW.js → Goo-28A_pNBg.js} +5 -5
- package/dist/core/{GradientMap-DxsOInED.js → GradientMap-D8dv-1AX.js} +1 -1
- package/dist/core/{Grayscale-DSHs9mZd.js → Grayscale-BlVXBVwW.js} +1 -1
- package/dist/core/{Grid-aO3wzf4X.js → Grid-D9vlHvs1.js} +1 -1
- package/dist/core/{GridDistortion-DsHsHda7.js → GridDistortion-BpqDvqj6.js} +2 -2
- package/dist/core/{Group-CCcDbysC.js → Group-bwQnJRec.js} +1 -1
- package/dist/core/{HTMLInCanvas-B2OooKKr.js → HTMLInCanvas-gCf64ozE.js} +1 -1
- package/dist/core/{Halftone-3a3rz4ln.js → Halftone-B_WouxiP.js} +1 -1
- package/dist/core/{Heart-CzO0_GoB.js → Heart-Bmt2TLNz.js} +2 -2
- package/dist/core/{Heatmap-DPtUc8YG.js → Heatmap-Ruef741_.js} +6 -6
- package/dist/core/{HexGrid-CN5A0m5j.js → HexGrid-By9k0YuI.js} +1 -1
- package/dist/core/{Hologram-DoKRhChe.js → Hologram-Cf25ONOE.js} +6 -6
- package/dist/core/{Holographic-BWyW5z_h.js → Holographic-C9RzYykt.js} +6 -6
- package/dist/core/{HueShift-C0p8EGk-.js → HueShift-V3gQVuIo.js} +1 -1
- package/dist/core/{ImageTexture-BnwkbXAW.js → ImageTexture-DAUR2N5Q.js} +2 -2
- package/dist/core/{InkFlow-BH86usRX.js → InkFlow-DlP1gmr4.js} +2 -2
- package/dist/core/{Invert-BIjy9ddK.js → Invert-K648khvD.js} +1 -1
- package/dist/core/{IrisWipe-lpU7lucQ.js → IrisWipe-Clkd_5CA.js} +1 -1
- package/dist/core/{IsometricCubes-CIieztxI.js → IsometricCubes-CzfAwpQ5.js} +1 -1
- package/dist/core/{Kaleidoscope-CUMvqmfN.js → Kaleidoscope-B9k6HkNn.js} +1 -1
- package/dist/core/{KeyFrames-mI1J02zX.js → KeyFrames-DX6JFhsy.js} +2 -2
- package/dist/core/LensDistortion-DG4VHEXV.js +435 -0
- package/dist/core/{LensFlare-ChQK_hJN.js → LensFlare-DO5lm--6.js} +2 -2
- package/dist/core/{LightEdge-Rg-zMpGb.js → LightEdge-CxWsQwpZ.js} +6 -6
- package/dist/core/{LightLeak-D1CxVo9A.js → LightLeak-tGJW6l2_.js} +3 -3
- package/dist/core/{LinearBlur-DJBkHfs8.js → LinearBlur-OmZcUden.js} +1 -1
- package/dist/core/{LinearGradient-DCRYBS4Q.js → LinearGradient-DDqFujWC.js} +2 -2
- package/dist/core/{LinearWipe-Cxfs1tIO.js → LinearWipe-BzthBFNb.js} +1 -1
- package/dist/core/{LiquidMetal-oscNnbsr.js → LiquidMetal-DpRAJ5Ne.js} +6 -6
- package/dist/core/{Liquify-CJwl6Wef.js → Liquify-BVzmuY6D.js} +2 -2
- package/dist/core/{MagneticFilings-DAOFLjAQ.js → MagneticFilings-BP1KyU2C.js} +893 -653
- package/dist/core/{Marble-Cr4Iaq38.js → Marble-abj97ioG.js} +3 -3
- package/dist/core/{Mirror-BwOuv3TP.js → Mirror-BYqbXWUj.js} +1 -1
- package/dist/core/{MultiPointGradient-CSowH0-7.js → MultiPointGradient-DZZSkiDv.js} +1 -1
- package/dist/core/{Neon-CPIvbGSB.js → Neon-DD8qY6H9.js} +4 -4
- package/dist/core/{NoiseDissolve-ByahROgQ.js → NoiseDissolve-DSkh5NdD.js} +2 -2
- package/dist/core/{ObjectTracker-DMCr6kHz.js → ObjectTracker-DvQF31-0.js} +2 -2
- package/dist/core/{PagePeel-Coq0hc8R.js → PagePeel-DWtgqWdt.js} +1 -1
- package/dist/core/{Paper-CLlhc3fn.js → Paper-DGzZsv79.js} +2 -2
- package/dist/core/{Parallelogram-Be8RQBV7.js → Parallelogram-Ce0Pg7DX.js} +2 -2
- package/dist/core/{ParticleField-DDO-Tk9X.js → ParticleField-CgCOigET.js} +1375 -1230
- package/dist/core/{ParticleFlow-B89PWVem.js → ParticleFlow-CRQhvYQx.js} +1264 -993
- package/dist/core/{Particles-D8rP46SB.js → Particles-fKk9qTkl.js} +681 -469
- package/dist/core/{PerlinNoise-_whB3Y3m.js → PerlinNoise-DIFK1BpN.js} +5 -5
- package/dist/core/{Perspective-BJuQWHOr.js → Perspective-CDNz_7y5.js} +1 -1
- package/dist/core/{PixelSort-CJfXD6g0.js → PixelSort-sgh5ghCc.js} +2 -2
- package/dist/core/{PixelThrow-BaTI5PzH.js → PixelThrow-CXtB4Am2.js} +1 -1
- package/dist/core/{Pixelate-D7Dto_8I.js → Pixelate-BSOzwVHo.js} +1 -1
- package/dist/core/{Plasma-DWIDcCnn.js → Plasma-G6Hl__3L.js} +3 -3
- package/dist/core/{Plastic-CWAOd2i9.js → Plastic-B6F2WeaX.js} +6 -6
- package/dist/core/{PolarCoordinates-DQM3dLK3.js → PolarCoordinates-Bi99omfI.js} +1 -1
- package/dist/core/{Polygon-CFmLohBu.js → Polygon-BFxoe-Fg.js} +2 -2
- package/dist/core/{Posterize-B8PHXwhy.js → Posterize-DxiCXLUL.js} +1 -1
- package/dist/core/{Prism-C5VS4TLU.js → Prism-D6J-acZf.js} +2 -2
- package/dist/core/{ProgressiveBlur-BcGcteLH.js → ProgressiveBlur-Bko6UMxQ.js} +3 -3
- package/dist/core/{RadialGradient-D3UoKiGu.js → RadialGradient-B_Dgxs9_.js} +2 -2
- package/dist/core/{RadialWipe-DXfAH0Ug.js → RadialWipe-U9n5aeiJ.js} +1 -1
- package/dist/core/{RandomBars-BVsp1Q7v.js → RandomBars-U_zpGDJh.js} +2 -2
- package/dist/core/{ReactionDiffusion-DknxOF-o.js → ReactionDiffusion-I9xj-iK_.js} +2 -2
- package/dist/core/{RectangularCoordinates-DFQm4y6H.js → RectangularCoordinates-DX6wutjX.js} +1 -1
- package/dist/core/{ReflectivePlane-BDlGBzo1.js → ReflectivePlane-DU9pf-7H.js} +3 -3
- package/dist/core/{Repeater-DHW6eDAm.js → Repeater-kCIaHHFy.js} +1 -1
- package/dist/core/{Ring-3brC5en8.js → Ring-B_tYq3KV.js} +2 -2
- package/dist/core/{RippleWipe-DQfXGjRv.js → RippleWipe-DCgZZ4VT.js} +1 -1
- package/dist/core/{Ripples-DajR3Cl5.js → Ripples-BDhMh7XC.js} +2 -2
- package/dist/core/{RoundedRect-CfkYNmkV.js → RoundedRect-9b3REf2d.js} +2 -2
- package/dist/core/{Saturation-BPTssGSs.js → Saturation-CcblT031.js} +1 -1
- package/dist/core/{Scratches-A-AyASZm.js → Scratches-Rzk27V6D.js} +5 -5
- package/dist/core/{Sharpness-Di39DpCB.js → Sharpness-ClLOnNR8.js} +1 -1
- package/dist/core/{Shatter-CWf3HtjN.js → Shatter-CLI896c7.js} +2 -2
- package/dist/core/{SimplexNoise-DpZ2jtdk.js → SimplexNoise-98RPhPzU.js} +4 -4
- package/dist/core/{SineWave-CZuksvHn.js → SineWave-BZPrTdYD.js} +2 -2
- package/dist/core/{SliceWipe-BwL2D3HR.js → SliceWipe-BR5Qr38C.js} +1 -1
- package/dist/core/{Smoke-BsUkbTI1.js → Smoke-DoW6Brlo.js} +3 -3
- package/dist/core/{SmokeFill-CaDMgNW-.js → SmokeFill-CXHhKX8u.js} +5 -5
- package/dist/core/{SmokeFlow-CLfsAbPS.js → SmokeFlow-mRJ_JcnZ.js} +3 -3
- package/dist/core/{Solarize-ALjXXAf0.js → Solarize-BNCG4TCa.js} +1 -1
- package/dist/core/{Spherize-SBfCc9Wk.js → Spherize-6d5WZIZV.js} +1 -1
- package/dist/core/{Spiral-iRrT222n.js → Spiral-IOZ-Zm0_.js} +2 -2
- package/dist/core/{Star-DL3d_HqY.js → Star-D9txpy4P.js} +2 -2
- package/dist/core/{Stone-OTsCM-rr.js → Stone-H2qLOvGJ.js} +2 -2
- package/dist/core/{Strands-DjoQgGnd.js → Strands-Db6_uJAi.js} +2 -2
- package/dist/core/{Stretch-CdzhxnbM.js → Stretch-BIFeD7-1.js} +1 -1
- package/dist/core/{Stripes-CsBgKYdp.js → Stripes-5YZhE4bc.js} +2 -2
- package/dist/core/{StudioBackground-D8EdrLg5.js → StudioBackground-B16ICQTt.js} +2 -2
- package/dist/core/{SunBurst-ErBFL-nF.js → SunBurst-DSUFLqjC.js} +2 -2
- package/dist/core/{Surface3D-CLjX61TZ.js → Surface3D-BoliMAeJ.js} +1826 -1420
- package/dist/core/{Swirl-DDQif_lC.js → Swirl-CozBN2cj.js} +2 -2
- package/dist/core/{Teardrop-CvpdElTs.js → Teardrop-D8uqqHu8.js} +2 -2
- package/dist/core/{Text-vyzeMvhl.js → Text-Dka9dwCa.js} +2 -2
- package/dist/core/{ThinFilm-CbkMTbD2.js → ThinFilm-d7IlUY62.js} +4 -4
- package/dist/core/{TiltShift-BVMyB8lF.js → TiltShift-CNc1M7bT.js} +3 -3
- package/dist/core/{TimeTrail-CuFGvzFi.js → TimeTrail-BFuqrI-l.js} +1058 -1699
- package/dist/core/{Tint-C6zMMsYH.js → Tint-BzCm1m93.js} +1 -1
- package/dist/core/{Trapezoid-kFuxWONU.js → Trapezoid-Dc6dpnCU.js} +2 -2
- package/dist/core/{TriangularGrid-FIrpI_qE.js → TriangularGrid-BMemTQ8X.js} +2 -2
- package/dist/core/{Tritone-DyLGtOug.js → Tritone-XnyfjYXL.js} +1 -1
- package/dist/core/{Truchet-B4NI56Zz.js → Truchet-DUbAZPvr.js} +1 -1
- package/dist/core/{Twirl-CuzhWXfj.js → Twirl-Dj6ZOh7V.js} +1 -1
- package/dist/core/{VHS-DYbzndAZ.js → VHS-DcN38Sa-.js} +1 -1
- package/dist/core/{VenetianBlinds-DVopy3xp.js → VenetianBlinds-Dsix9S6Y.js} +1 -1
- package/dist/core/{Vesica-Cd-XyG3F.js → Vesica-BvLPrNBY.js} +2 -2
- package/dist/core/{Vibrance-CvXatkfO.js → Vibrance-B3F1IOJC.js} +1 -1
- package/dist/core/{VideoTexture-C5PS6Vly.js → VideoTexture-rZnbkY1j.js} +1 -1
- package/dist/core/{Vignette-DtBpWWxW.js → Vignette-D747S9Un.js} +1 -1
- package/dist/core/{Voronoi-CRH2cGlR.js → Voronoi-tdjJp1Yz.js} +2 -2
- package/dist/core/{Water-CneenzRZ.js → Water-wnYFmeVF.js} +6 -6
- package/dist/core/{Watercolor-B343pgM-.js → Watercolor-DlrWTnkX.js} +267 -350
- package/dist/core/{WaveDistortion-DHz1FxLT.js → WaveDistortion-11QwOfVR.js} +2 -2
- package/dist/core/{WaveletNoise-CsLE9gbM.js → WaveletNoise-DWOzHG3M.js} +5 -5
- package/dist/core/{Weave-CQEF71nr.js → Weave-CdGwj7cZ.js} +1 -1
- package/dist/core/{WebcamTexture-BcsYFM_g.js → WebcamTexture-CihYSbzd.js} +2 -2
- package/dist/core/{Wool-BFSicimy.js → Wool-DKCBMabi.js} +2 -2
- package/dist/core/{WorleyNoise-BKq3es5v.js → WorleyNoise-BjD32UOl.js} +2 -2
- package/dist/core/{ZoomBlur-Bu1SlmS2.js → ZoomBlur-BnRTijPn.js} +1 -1
- package/dist/core/{agents-Bv3--qPL.js → agents-c-JjGH1b.js} +446 -3
- package/dist/core/{blur-tvWOoxKt.js → blur-DKmdsW6d.js} +2 -2
- package/dist/core/{compute-BjeJ0sIA.js → compute-BoeIXi0l.js} +1 -1
- package/dist/core/{edges-BXNBKxSN.js → edges-BZUKQxSE.js} +1 -1
- package/dist/core/{glass-IfoQ8Prf.js → glass-BVqgjSPg.js} +1 -1
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/gpu/kit/agents.d.ts +17 -1
- package/dist/core/gpu/kit/agents.d.ts.map +1 -1
- package/dist/core/gpu/passManager.d.ts +6 -2
- package/dist/core/gpu/passManager.d.ts.map +1 -1
- package/dist/core/gpu/textures.d.ts +2 -2
- package/dist/core/gpu/textures.d.ts.map +1 -1
- package/dist/core/index.js +229 -209
- package/dist/core/{media-B9BNeMPu.js → media-Ds6MRfGR.js} +1 -1
- package/dist/core/{noise-wTSHXgFz.js → noise-Cq0KUOSC.js} +1 -1
- package/dist/core/{noiseColor-CPakiKNF.js → noiseColor-CQyzqpVZ.js} +2 -2
- package/dist/core/{noiseColor-DscZM9CO.js → noiseColor-DjCUZ_8u.js} +1 -1
- package/dist/core/{noiseStylize-BXpflWPW.js → noiseStylize-fKVcJbGK.js} +2 -2
- package/dist/core/{porters-DBK1Aipq.js → porters-DogLzpKT.js} +1 -1
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +205 -204
- package/dist/core/{sdf-R0EN3EvS.js → sdf-o99ONcMJ.js} +1 -1
- package/dist/core/shaderRegistry-CkDrffEe.js +427 -0
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +4 -4
- package/dist/core/shaders/Arc/index.js +5 -5
- package/dist/core/shaders/Ascii/index.js +4 -4
- package/dist/core/shaders/Aurora/index.js +5 -5
- package/dist/core/shaders/BarShift/index.js +4 -4
- package/dist/core/shaders/BarnDoors/index.js +4 -4
- package/dist/core/shaders/Beam/index.js +4 -4
- package/dist/core/shaders/Bend/index.js +4 -4
- package/dist/core/shaders/Blob/index.js +4 -4
- package/dist/core/shaders/BlockDissolve/index.js +5 -5
- package/dist/core/shaders/BlockNoise/index.js +7 -7
- package/dist/core/shaders/BlueNoise/index.js +7 -7
- package/dist/core/shaders/Blur/index.js +5 -5
- package/dist/core/shaders/Boids/index.d.ts +3 -3
- package/dist/core/shaders/Boids/index.d.ts.map +1 -1
- package/dist/core/shaders/Boids/index.js +8 -7
- package/dist/core/shaders/BokehBlur/index.js +5 -5
- package/dist/core/shaders/BrickPattern/index.js +4 -4
- package/dist/core/shaders/BrightnessContrast/index.js +4 -4
- package/dist/core/shaders/BrushedMetal/index.js +8 -8
- package/dist/core/shaders/Bulge/index.js +4 -4
- package/dist/core/shaders/CRTScreen/index.js +4 -4
- package/dist/core/shaders/CarbonFiber/index.js +8 -8
- package/dist/core/shaders/Chalkboard/index.js +4 -4
- package/dist/core/shaders/ChannelBlur/index.js +5 -5
- package/dist/core/shaders/CheckerWipe/index.js +4 -4
- package/dist/core/shaders/Checkerboard/index.js +4 -4
- package/dist/core/shaders/Chevron/index.js +4 -4
- package/dist/core/shaders/ChromaFlow/index.js +4 -4
- package/dist/core/shaders/ChromaticAberration/index.js +4 -4
- package/dist/core/shaders/Circle/index.js +5 -5
- package/dist/core/shaders/ColorWheel/index.js +4 -4
- package/dist/core/shaders/CompressionArtifacts/index.js +4 -4
- package/dist/core/shaders/ConcentricSpin/index.js +4 -4
- package/dist/core/shaders/ConicGradient/index.js +4 -4
- package/dist/core/shaders/ContourLines/index.js +4 -4
- package/dist/core/shaders/CornerPin/index.js +4 -4
- package/dist/core/shaders/Crescent/index.js +5 -5
- package/dist/core/shaders/Cross/index.js +5 -5
- package/dist/core/shaders/Crystal/index.js +8 -8
- package/dist/core/shaders/CurlNoise/index.js +7 -7
- package/dist/core/shaders/CursorRipples/index.js +4 -4
- package/dist/core/shaders/CursorTrail/index.js +4 -4
- package/dist/core/shaders/DataMosh/index.js +4 -4
- package/dist/core/shaders/DiamondGradient/index.js +4 -4
- package/dist/core/shaders/DiamondWipe/index.js +4 -4
- package/dist/core/shaders/DiffuseBlur/index.js +4 -4
- package/dist/core/shaders/DisplacementMap/index.js +4 -4
- package/dist/core/shaders/Dither/index.js +4 -4
- package/dist/core/shaders/DotGrid/index.js +4 -4
- package/dist/core/shaders/DropShadow/index.js +4 -4
- package/dist/core/shaders/Duotone/index.js +4 -4
- package/dist/core/shaders/Ellipse/index.js +5 -5
- package/dist/core/shaders/Emboss/index.js +7 -7
- package/dist/core/shaders/Engraving/index.js +5 -5
- package/dist/core/shaders/ErosionNoise/index.js +7 -7
- package/dist/core/shaders/Exposure/index.js +4 -4
- package/dist/core/shaders/FallingLines/index.js +4 -4
- package/dist/core/shaders/FilmGrain/index.js +4 -4
- package/dist/core/shaders/FilmStock/index.js +5 -5
- package/dist/core/shaders/Flip/index.js +4 -4
- package/dist/core/shaders/FloatingParticles/index.d.ts +9 -4
- package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +8 -7
- package/dist/core/shaders/FlowField/index.js +5 -5
- package/dist/core/shaders/Flower/index.js +5 -5
- package/dist/core/shaders/FlowingGradient/index.js +5 -5
- package/dist/core/shaders/FlutedGlass/index.js +4 -4
- package/dist/core/shaders/Fog/index.js +4 -4
- package/dist/core/shaders/Form3D/index.js +4 -4
- package/dist/core/shaders/FractalNoise/index.js +6 -6
- package/dist/core/shaders/Frost/index.js +8 -8
- package/dist/core/shaders/GaborNoise/index.js +7 -7
- package/dist/core/shaders/Glass/index.js +8 -8
- package/dist/core/shaders/GlassTiles/index.js +4 -4
- package/dist/core/shaders/Glitch/index.d.ts +1 -1
- package/dist/core/shaders/Glitch/index.d.ts.map +1 -1
- package/dist/core/shaders/Glitch/index.js +4 -4
- package/dist/core/shaders/Glow/index.js +5 -5
- package/dist/core/shaders/Godrays/index.js +4 -4
- package/dist/core/shaders/Goo/index.js +7 -7
- package/dist/core/shaders/GradientMap/index.js +4 -4
- package/dist/core/shaders/Grayscale/index.js +4 -4
- package/dist/core/shaders/Grid/index.js +4 -4
- package/dist/core/shaders/GridDistortion/index.js +4 -4
- package/dist/core/shaders/Group/index.js +4 -4
- package/dist/core/shaders/HTMLInCanvas/index.js +4 -4
- package/dist/core/shaders/Halftone/index.js +4 -4
- package/dist/core/shaders/Heart/index.js +5 -5
- package/dist/core/shaders/Heatmap/index.js +8 -8
- package/dist/core/shaders/HexGrid/index.js +4 -4
- package/dist/core/shaders/Hologram/index.js +8 -8
- package/dist/core/shaders/Holographic/index.js +8 -8
- package/dist/core/shaders/HueShift/index.js +4 -4
- package/dist/core/shaders/ImageTexture/index.js +5 -5
- package/dist/core/shaders/InkFlow/index.js +4 -4
- package/dist/core/shaders/Invert/index.js +4 -4
- package/dist/core/shaders/IrisWipe/index.js +4 -4
- package/dist/core/shaders/IsometricCubes/index.js +4 -4
- package/dist/core/shaders/Kaleidoscope/index.js +4 -4
- package/dist/core/shaders/KeyFrames/index.js +4 -4
- package/dist/core/shaders/LensDistortion/index.d.ts +123 -0
- package/dist/core/shaders/LensDistortion/index.d.ts.map +1 -0
- package/dist/core/shaders/LensDistortion/index.js +8 -0
- package/dist/core/shaders/LensFlare/index.js +4 -4
- package/dist/core/shaders/LightEdge/index.js +8 -8
- package/dist/core/shaders/LightLeak/index.js +5 -5
- package/dist/core/shaders/LinearBlur/index.js +4 -4
- package/dist/core/shaders/LinearGradient/index.js +4 -4
- package/dist/core/shaders/LinearWipe/index.js +4 -4
- package/dist/core/shaders/LiquidMetal/index.js +8 -8
- package/dist/core/shaders/Liquify/index.js +4 -4
- package/dist/core/shaders/MagneticFilings/index.d.ts +0 -2
- package/dist/core/shaders/MagneticFilings/index.d.ts.map +1 -1
- package/dist/core/shaders/MagneticFilings/index.js +8 -7
- package/dist/core/shaders/Marble/index.js +5 -5
- package/dist/core/shaders/Mirror/index.js +4 -4
- package/dist/core/shaders/MultiPointGradient/index.js +4 -4
- package/dist/core/shaders/Neon/index.js +6 -6
- package/dist/core/shaders/NoiseDissolve/index.js +5 -5
- package/dist/core/shaders/ObjectTracker/index.js +5 -5
- package/dist/core/shaders/PagePeel/index.js +4 -4
- package/dist/core/shaders/Paper/index.js +5 -5
- package/dist/core/shaders/Parallelogram/index.js +5 -5
- package/dist/core/shaders/ParticleField/index.d.ts +10 -5
- package/dist/core/shaders/ParticleField/index.d.ts.map +1 -1
- package/dist/core/shaders/ParticleField/index.js +7 -7
- package/dist/core/shaders/ParticleFlow/index.d.ts +10 -4
- package/dist/core/shaders/ParticleFlow/index.d.ts.map +1 -1
- package/dist/core/shaders/ParticleFlow/index.js +8 -7
- package/dist/core/shaders/Particles/index.d.ts +4 -3
- package/dist/core/shaders/Particles/index.d.ts.map +1 -1
- package/dist/core/shaders/Particles/index.js +9 -9
- package/dist/core/shaders/PerlinNoise/index.js +7 -7
- package/dist/core/shaders/Perspective/index.js +4 -4
- package/dist/core/shaders/PixelSort/index.js +4 -4
- package/dist/core/shaders/PixelThrow/index.js +4 -4
- package/dist/core/shaders/Pixelate/index.js +4 -4
- package/dist/core/shaders/Plasma/index.js +5 -5
- package/dist/core/shaders/Plastic/index.js +8 -8
- package/dist/core/shaders/PolarCoordinates/index.js +4 -4
- package/dist/core/shaders/Polygon/index.js +5 -5
- package/dist/core/shaders/Posterize/index.js +4 -4
- package/dist/core/shaders/Prism/index.js +4 -4
- package/dist/core/shaders/ProgressiveBlur/index.js +5 -5
- package/dist/core/shaders/RadialGradient/index.js +4 -4
- package/dist/core/shaders/RadialWipe/index.js +4 -4
- package/dist/core/shaders/RandomBars/index.js +5 -5
- package/dist/core/shaders/ReactionDiffusion/index.js +4 -4
- package/dist/core/shaders/RectangularCoordinates/index.js +4 -4
- package/dist/core/shaders/ReflectivePlane/index.js +5 -5
- package/dist/core/shaders/Repeater/index.js +4 -4
- package/dist/core/shaders/Ring/index.js +5 -5
- package/dist/core/shaders/RippleWipe/index.js +4 -4
- package/dist/core/shaders/Ripples/index.js +4 -4
- package/dist/core/shaders/RoundedRect/index.js +5 -5
- package/dist/core/shaders/Saturation/index.js +4 -4
- package/dist/core/shaders/Scratches/index.js +7 -7
- package/dist/core/shaders/Sharpness/index.js +4 -4
- package/dist/core/shaders/Shatter/index.js +4 -4
- package/dist/core/shaders/SimplexNoise/index.js +6 -6
- package/dist/core/shaders/SineWave/index.js +4 -4
- package/dist/core/shaders/SliceWipe/index.js +4 -4
- package/dist/core/shaders/Smoke/index.js +4 -4
- package/dist/core/shaders/SmokeFill/index.js +7 -7
- package/dist/core/shaders/SmokeFlow/index.js +4 -4
- package/dist/core/shaders/Solarize/index.js +4 -4
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +4 -4
- package/dist/core/shaders/Spiral/index.js +4 -4
- package/dist/core/shaders/Star/index.js +5 -5
- package/dist/core/shaders/Stone/index.js +4 -4
- package/dist/core/shaders/Strands/index.js +4 -4
- package/dist/core/shaders/Stretch/index.js +4 -4
- package/dist/core/shaders/Stripes/index.js +4 -4
- package/dist/core/shaders/StudioBackground/index.js +4 -4
- package/dist/core/shaders/SunBurst/index.js +4 -4
- package/dist/core/shaders/Surface3D/index.d.ts +4 -2
- package/dist/core/shaders/Surface3D/index.d.ts.map +1 -1
- package/dist/core/shaders/Surface3D/index.js +6 -5
- package/dist/core/shaders/Swirl/index.js +4 -4
- package/dist/core/shaders/Teardrop/index.js +5 -5
- package/dist/core/shaders/Text/index.js +5 -5
- package/dist/core/shaders/ThinFilm/index.js +6 -6
- package/dist/core/shaders/TiltShift/index.js +5 -5
- package/dist/core/shaders/TimeTrail/index.d.ts +47 -1
- package/dist/core/shaders/TimeTrail/index.d.ts.map +1 -1
- package/dist/core/shaders/TimeTrail/index.js +6 -5
- package/dist/core/shaders/Tint/index.js +4 -4
- package/dist/core/shaders/Trapezoid/index.js +5 -5
- package/dist/core/shaders/TriangularGrid/index.js +4 -4
- package/dist/core/shaders/Tritone/index.js +4 -4
- package/dist/core/shaders/Truchet/index.js +4 -4
- package/dist/core/shaders/Twirl/index.js +4 -4
- package/dist/core/shaders/VHS/index.js +4 -4
- package/dist/core/shaders/VenetianBlinds/index.js +4 -4
- package/dist/core/shaders/Vesica/index.js +5 -5
- package/dist/core/shaders/Vibrance/index.js +4 -4
- package/dist/core/shaders/VideoTexture/index.js +4 -4
- package/dist/core/shaders/Vignette/index.js +4 -4
- package/dist/core/shaders/Voronoi/index.js +4 -4
- package/dist/core/shaders/Water/index.js +8 -8
- package/dist/core/shaders/Watercolor/index.d.ts +1 -1
- package/dist/core/shaders/Watercolor/index.d.ts.map +1 -1
- package/dist/core/shaders/Watercolor/index.js +5 -4
- package/dist/core/shaders/WaveDistortion/index.js +4 -4
- package/dist/core/shaders/WaveletNoise/index.js +7 -7
- package/dist/core/shaders/Weave/index.js +4 -4
- package/dist/core/shaders/WebcamTexture/index.js +5 -5
- package/dist/core/shaders/Wool/index.js +4 -4
- package/dist/core/shaders/WorleyNoise/index.js +4 -4
- package/dist/core/shaders/ZoomBlur/index.js +4 -4
- package/dist/core/{shapeEffectBounds-CtKwBX8c.js → shapeEffectBounds-Dg4GQ5vW.js} +3 -3
- package/dist/js/bundle.js +174 -174
- package/dist/js/createShader.js +1 -1
- package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.js +27 -0
- package/dist/react/LensDistortion.js +226 -0
- package/dist/react/Preview.js +1 -0
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +160 -160
- package/dist/react/components/LensDistortion.d.ts +54 -0
- package/dist/react/components/LensDistortion.d.ts.map +1 -0
- package/dist/react/engine/Preview.d.ts.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +27 -0
- package/dist/registry.js +585 -1
- package/dist/solid/components/LensDistortion.d.ts +51 -0
- package/dist/solid/components/LensDistortion.d.ts.map +1 -0
- package/dist/solid/components/LensDistortion.js +232 -0
- package/dist/solid/engine/Preview.d.ts.map +1 -1
- package/dist/solid/engine/Preview.js +193 -191
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +194 -192
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +27 -0
- package/dist/svelte/components/LensDistortion.svelte.d.ts +41 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +2751 -2544
- package/dist/svelte/source/components/LensDistortion.svelte +365 -0
- package/dist/svelte/source/engine/Preview.svelte +2 -0
- package/dist/svelte/source/index.js +1 -0
- package/dist/svelte/utils/generatePresetCode.js +27 -0
- package/dist/vue/LensDistortion.js +3 -0
- package/dist/vue/LensDistortion.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/vue/components/LensDistortion.vue.d.ts +76 -0
- package/dist/vue/components/LensDistortion.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +2 -1
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +27 -0
- package/package.json +9 -1
- package/dist/core/shaderRegistry-CcvE7wN0.js +0 -425
- /package/dist/core/{SolidColor-Cu_9b_my.js → SolidColor-dYxjV0YF.js} +0 -0
- /package/dist/core/{fonts-v_F1SFl9.js → fonts-DFuXI3Hk.js} +0 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { N as unpremultiplyAlpha, b as Expr, d as ZERO, g as expr, p as call, x as formatFloat } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { t as isMobileGpuViewport } from "./device-BODv_4aH.js";
|
|
3
|
+
import { c as transformPosition, r as transformAngle } from "./transformations-CsPUHppB.js";
|
|
4
|
+
var MAX_SAMPLES = 50;
|
|
5
|
+
var MAX_TAPS = isMobileGpuViewport() ? 24 : MAX_SAMPLES;
|
|
6
|
+
const componentDefinition = {
|
|
7
|
+
name: "LensDistortion",
|
|
8
|
+
boundingBoxDeclaration: { aspectRatio: null },
|
|
9
|
+
category: "Stylize",
|
|
10
|
+
description: "Split content into shifting chromatic layers with barrel or pincushion lens warp. Powered by Paper Shaders.",
|
|
11
|
+
requiresRTT: true,
|
|
12
|
+
requiresChild: true,
|
|
13
|
+
props: {
|
|
14
|
+
center: {
|
|
15
|
+
default: {
|
|
16
|
+
x: .5,
|
|
17
|
+
y: .5
|
|
18
|
+
},
|
|
19
|
+
transform: transformPosition,
|
|
20
|
+
description: "The center point of the lens effect — the focus zone, lens warp, circle crop and swirl all pivot around it",
|
|
21
|
+
ui: {
|
|
22
|
+
type: "position",
|
|
23
|
+
label: "Center",
|
|
24
|
+
group: "Position"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
spread: {
|
|
28
|
+
default: .6,
|
|
29
|
+
description: "Strength of the color split; how far the color layers are pushed apart (0 is off)",
|
|
30
|
+
ui: {
|
|
31
|
+
type: ["range", "map"],
|
|
32
|
+
min: 0,
|
|
33
|
+
max: 1,
|
|
34
|
+
step: .01,
|
|
35
|
+
label: "Spread",
|
|
36
|
+
group: "Spread"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
angle: {
|
|
40
|
+
default: 0,
|
|
41
|
+
transform: transformAngle,
|
|
42
|
+
description: "Direction of the spread in degrees",
|
|
43
|
+
ui: {
|
|
44
|
+
type: ["range", "map"],
|
|
45
|
+
min: 0,
|
|
46
|
+
max: 360,
|
|
47
|
+
step: 1,
|
|
48
|
+
label: "Angle",
|
|
49
|
+
group: "Spread"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
perspective: {
|
|
53
|
+
default: .1,
|
|
54
|
+
description: "Shapes the spread direction from a straight line (0) to a radial burst out from the centre (1)",
|
|
55
|
+
ui: {
|
|
56
|
+
type: ["range", "map"],
|
|
57
|
+
min: 0,
|
|
58
|
+
max: 1,
|
|
59
|
+
step: .01,
|
|
60
|
+
label: "Perspective",
|
|
61
|
+
group: "Spread"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
bias: {
|
|
65
|
+
default: 1,
|
|
66
|
+
description: "Shifts the colors toward one end of the spread; 0 spaces them evenly",
|
|
67
|
+
ui: {
|
|
68
|
+
type: ["range", "map"],
|
|
69
|
+
min: -1,
|
|
70
|
+
max: 1,
|
|
71
|
+
step: .01,
|
|
72
|
+
label: "Bias",
|
|
73
|
+
group: "Spread"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
count: {
|
|
77
|
+
default: 35,
|
|
78
|
+
description: "Number of sampled color layers along the spread; higher is smoother and costlier",
|
|
79
|
+
ui: {
|
|
80
|
+
type: ["range", "map"],
|
|
81
|
+
min: 2,
|
|
82
|
+
max: MAX_SAMPLES,
|
|
83
|
+
step: 1,
|
|
84
|
+
label: "Count",
|
|
85
|
+
group: "Spread"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
dispersion: {
|
|
89
|
+
default: 1,
|
|
90
|
+
description: "Overall amount of color dispersion; 1 gives each layer its own color from the spectrum, 0 keeps the original color",
|
|
91
|
+
ui: {
|
|
92
|
+
type: ["range", "map"],
|
|
93
|
+
min: 0,
|
|
94
|
+
max: 1,
|
|
95
|
+
step: .01,
|
|
96
|
+
label: "Dispersion",
|
|
97
|
+
group: "Dispersion"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
dispersionShift: {
|
|
101
|
+
default: 0,
|
|
102
|
+
description: "Balance of the dispersion between a soft circular zone at the centre and the rest; -1 keeps it in the centre only, 1 at the edges only",
|
|
103
|
+
ui: {
|
|
104
|
+
type: ["range", "map"],
|
|
105
|
+
min: -1,
|
|
106
|
+
max: 1,
|
|
107
|
+
step: .01,
|
|
108
|
+
label: "Shift",
|
|
109
|
+
group: "Dispersion"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
dispersionColor: {
|
|
113
|
+
default: .6,
|
|
114
|
+
description: "Rotates the dispersion colors around the hue wheel, 0 to 1 for a full turn",
|
|
115
|
+
ui: {
|
|
116
|
+
type: ["range", "map"],
|
|
117
|
+
min: 0,
|
|
118
|
+
max: 1,
|
|
119
|
+
step: .01,
|
|
120
|
+
label: "Hue",
|
|
121
|
+
group: "Dispersion"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
focusCenter: {
|
|
125
|
+
default: .8,
|
|
126
|
+
description: "Reduces the spread in a circular zone at the centre; 0 keeps it full to the centre",
|
|
127
|
+
ui: {
|
|
128
|
+
type: ["range", "map"],
|
|
129
|
+
min: 0,
|
|
130
|
+
max: 1,
|
|
131
|
+
step: .01,
|
|
132
|
+
label: "Focus Center",
|
|
133
|
+
group: "Focus"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
focusEdges: {
|
|
137
|
+
default: 1,
|
|
138
|
+
description: "Reduces the spread toward the edges; 1 restores the original image there",
|
|
139
|
+
ui: {
|
|
140
|
+
type: ["range", "map"],
|
|
141
|
+
min: 0,
|
|
142
|
+
max: 1,
|
|
143
|
+
step: .01,
|
|
144
|
+
label: "Focus Edges",
|
|
145
|
+
group: "Focus"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
lensBulge: {
|
|
149
|
+
default: 0,
|
|
150
|
+
description: "Radial lens warp; positive bulges out like a fisheye, negative pinches in like a pincushion",
|
|
151
|
+
ui: {
|
|
152
|
+
type: ["range", "map"],
|
|
153
|
+
min: -1,
|
|
154
|
+
max: 1,
|
|
155
|
+
step: .01,
|
|
156
|
+
label: "Bulge",
|
|
157
|
+
group: "Lens"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
lensCircle: {
|
|
161
|
+
default: 0,
|
|
162
|
+
description: "Squeezes pixels outside the inscribed circle inward so the outline becomes a circle",
|
|
163
|
+
ui: {
|
|
164
|
+
type: ["range", "map"],
|
|
165
|
+
min: 0,
|
|
166
|
+
max: 1,
|
|
167
|
+
step: .01,
|
|
168
|
+
label: "Circle",
|
|
169
|
+
group: "Lens"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
swirl: {
|
|
173
|
+
default: .35,
|
|
174
|
+
description: "Rotates the color layers around the centre by an angle growing along the spread; 0 is off",
|
|
175
|
+
ui: {
|
|
176
|
+
type: ["range", "map"],
|
|
177
|
+
min: -1,
|
|
178
|
+
max: 1,
|
|
179
|
+
step: .01,
|
|
180
|
+
label: "Swirl",
|
|
181
|
+
group: "Lens"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
noise: {
|
|
185
|
+
default: 0,
|
|
186
|
+
description: "Scatters the spread direction with noise; 0 is off",
|
|
187
|
+
ui: {
|
|
188
|
+
type: ["range", "map"],
|
|
189
|
+
min: 0,
|
|
190
|
+
max: 1,
|
|
191
|
+
step: .01,
|
|
192
|
+
label: "Noise",
|
|
193
|
+
group: "Noise"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
noiseFrequency: {
|
|
197
|
+
default: .25,
|
|
198
|
+
description: "Frequency of the direction noise; higher is finer (no effect with noise at 0)",
|
|
199
|
+
ui: {
|
|
200
|
+
type: ["range", "map"],
|
|
201
|
+
min: 0,
|
|
202
|
+
max: 1,
|
|
203
|
+
step: .01,
|
|
204
|
+
label: "Frequency",
|
|
205
|
+
group: "Noise"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
noiseOffset: {
|
|
209
|
+
default: 0,
|
|
210
|
+
description: "Offsets the noise pattern for a different seed (no effect with noise at 0)",
|
|
211
|
+
ui: {
|
|
212
|
+
type: ["range", "map"],
|
|
213
|
+
min: 0,
|
|
214
|
+
max: 1,
|
|
215
|
+
step: .01,
|
|
216
|
+
label: "Seed",
|
|
217
|
+
group: "Noise"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
grainMixer: {
|
|
221
|
+
default: 0,
|
|
222
|
+
description: "Scatters the spread with grain noise, breaking up the edges of the color layers",
|
|
223
|
+
ui: {
|
|
224
|
+
type: ["range", "map"],
|
|
225
|
+
min: 0,
|
|
226
|
+
max: 1,
|
|
227
|
+
step: .01,
|
|
228
|
+
label: "Grain Mixer",
|
|
229
|
+
group: "Grain"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
grainOverlay: {
|
|
233
|
+
default: 0,
|
|
234
|
+
description: "Post-processing black/white grain overlay",
|
|
235
|
+
ui: {
|
|
236
|
+
type: ["range", "map"],
|
|
237
|
+
min: 0,
|
|
238
|
+
max: 1,
|
|
239
|
+
step: .01,
|
|
240
|
+
label: "Grain Overlay",
|
|
241
|
+
group: "Grain"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
fragment: (params) => {
|
|
246
|
+
const { uniforms, childNode, ctx, convertToTexture } = params;
|
|
247
|
+
if (!childNode) return ZERO;
|
|
248
|
+
const texKey = convertToTexture(childNode).key;
|
|
249
|
+
const PI = Math.PI;
|
|
250
|
+
return new Expr((ec) => {
|
|
251
|
+
const U = (name) => uniforms[name]._emit(ec);
|
|
252
|
+
const L = (n) => formatFloat(n);
|
|
253
|
+
const p = ec.freshLocal("lens");
|
|
254
|
+
const stmts = [];
|
|
255
|
+
let noiseIdx = 0;
|
|
256
|
+
const emitValueNoise = (lines, inputExpr, outName) => {
|
|
257
|
+
const n = `${p}_vn${noiseIdx++}`;
|
|
258
|
+
lines.push(`let ${n}_st = ${inputExpr};`);
|
|
259
|
+
lines.push(`let ${n}_fi = floor(${n}_st);`);
|
|
260
|
+
lines.push(`let ${n}_ff = fract(${n}_st);`);
|
|
261
|
+
for (const [k, off] of [
|
|
262
|
+
["a", "vec2f(0.0, 0.0)"],
|
|
263
|
+
["b", "vec2f(1.0, 0.0)"],
|
|
264
|
+
["c", "vec2f(0.0, 1.0)"],
|
|
265
|
+
["d", "vec2f(1.0, 1.0)"]
|
|
266
|
+
]) {
|
|
267
|
+
lines.push(`var ${n}_q${k} = fract((${n}_fi + ${off}) * vec2f(0.3183099, 0.3678794)) + vec2f(0.1);`);
|
|
268
|
+
lines.push(`${n}_q${k} = ${n}_q${k} + vec2f(dot(${n}_q${k}, ${n}_q${k} + vec2f(19.19)));`);
|
|
269
|
+
lines.push(`let ${n}_h${k} = fract(${n}_q${k}.x * ${n}_q${k}.y);`);
|
|
270
|
+
}
|
|
271
|
+
lines.push(`let ${n}_u = ${n}_ff * ${n}_ff * (vec2f(3.0) - 2.0 * ${n}_ff);`);
|
|
272
|
+
lines.push(`let ${outName} = mix(mix(${n}_ha, ${n}_hb, ${n}_u.x), mix(${n}_hc, ${n}_hd, ${n}_u.x), ${n}_u.y);`);
|
|
273
|
+
};
|
|
274
|
+
stmts.push(`let ${p}_uv = ${ctx.uv._emit(ec)};`);
|
|
275
|
+
stmts.push(`let ${p}_aspect = ${ctx.aspect._emit(ec)};`);
|
|
276
|
+
stmts.push(`let ${p}_invAspect = 1.0 / ${p}_aspect;`);
|
|
277
|
+
stmts.push(`let ${p}_inradius = 0.5 * min(${p}_aspect, 1.0);`);
|
|
278
|
+
stmts.push(`let ${p}_outradius = 0.5 * length(vec2f(${p}_aspect, 1.0));`);
|
|
279
|
+
stmts.push(`let ${p}_spread = ${U("spread")};`);
|
|
280
|
+
stmts.push(`let ${p}_reach = 0.7 * pow(${p}_spread, 1.3 + 2.7 * ${p}_spread);`);
|
|
281
|
+
stmts.push(`let ${p}_centerU = ${U("center")};`);
|
|
282
|
+
stmts.push(`let ${p}_c = vec2f(${p}_centerU.x, 1.0 - ${p}_centerU.y);`);
|
|
283
|
+
stmts.push(`let ${p}_fromCenter = vec2f((${p}_uv.x - ${p}_c.x) * ${p}_aspect, ${p}_uv.y - ${p}_c.y);`);
|
|
284
|
+
stmts.push(`let ${p}_radius = length(${p}_fromCenter);`);
|
|
285
|
+
stmts.push(`let ${p}_lensBulge = ${U("lensBulge")};`);
|
|
286
|
+
stmts.push(`let ${p}_lensCircle = ${U("lensCircle")};`);
|
|
287
|
+
stmts.push(`var ${p}_bulgeFade = 1.0;`);
|
|
288
|
+
stmts.push(`var ${p}_warped = ${p}_fromCenter;`);
|
|
289
|
+
stmts.push(`let ${p}_rSafe = max(${p}_radius, 1e-5);`);
|
|
290
|
+
stmts.push(`if (${p}_lensBulge != 0.0) {`);
|
|
291
|
+
stmts.push(` let ${p}_rn = ${p}_rSafe / ${p}_inradius;`);
|
|
292
|
+
stmts.push(` let ${p}_bulgeAmt = abs(${p}_lensBulge) * select(1.2, 1.4, ${p}_lensBulge > 0.0);`);
|
|
293
|
+
stmts.push(` ${p}_bulgeFade = select(1.0, 1.0 - smoothstep(1.45, 1.53, ${p}_rn * ${p}_bulgeAmt), ${p}_lensBulge > 0.0);`);
|
|
294
|
+
stmts.push(` let ${p}_mapPos = tan(min(${p}_rn * ${p}_bulgeAmt, 1.53)) / tan(${p}_bulgeAmt);`);
|
|
295
|
+
stmts.push(` let ${p}_mapNeg = atan(${p}_rn * tan(${p}_bulgeAmt)) / ${p}_bulgeAmt;`);
|
|
296
|
+
stmts.push(` let ${p}_bulgeScale = select(${p}_mapNeg, ${p}_mapPos, ${p}_lensBulge > 0.0) / ${p}_rn;`);
|
|
297
|
+
stmts.push(` ${p}_warped = ${p}_warped * ${p}_bulgeScale;`);
|
|
298
|
+
stmts.push(`}`);
|
|
299
|
+
stmts.push(`if (${p}_lensCircle > 0.0) {`);
|
|
300
|
+
stmts.push(` let ${p}_wr = length(${p}_warped);`);
|
|
301
|
+
stmts.push(` let ${p}_dir = ${p}_warped / max(${p}_wr, 1e-5);`);
|
|
302
|
+
stmts.push(` let ${p}_halfBox = vec2f(${p}_aspect, 1.0) * 0.5;`);
|
|
303
|
+
stmts.push(` let ${p}_boxOff = vec2f((${p}_c.x - 0.5) * ${p}_aspect, ${p}_c.y - 0.5);`);
|
|
304
|
+
stmts.push(` let ${p}_rBox = min((${p}_halfBox.x - sign(${p}_dir.x) * ${p}_boxOff.x) / max(abs(${p}_dir.x), 1e-4), (${p}_halfBox.y - sign(${p}_dir.y) * ${p}_boxOff.y) / max(abs(${p}_dir.y), 1e-4));`);
|
|
305
|
+
stmts.push(` let ${p}_band = ${p}_inradius * mix(0.03, 0.2, 0.5 * (${p}_lensBulge + 1.0));`);
|
|
306
|
+
stmts.push(` let ${p}_over = smoothstep(0.0, 1.0, (${p}_wr - (${p}_inradius - ${p}_band)) / ${p}_band);`);
|
|
307
|
+
stmts.push(` let ${p}_g = ${p}_wr + (${p}_rBox - ${p}_inradius) * pow(${p}_over, 14.0);`);
|
|
308
|
+
stmts.push(` ${p}_warped = ${p}_dir * mix(${p}_wr, ${p}_g, ${p}_lensCircle);`);
|
|
309
|
+
stmts.push(`}`);
|
|
310
|
+
stmts.push(`let ${p}_baseUV = vec2f(${p}_warped.x * ${p}_invAspect, ${p}_warped.y) + ${p}_c;`);
|
|
311
|
+
stmts.push(`let ${p}_baseDeriv = fwidth(${p}_baseUV);`);
|
|
312
|
+
stmts.push(`let ${p}_edgeAA = clamp(2.0 * max(${p}_baseDeriv.x, ${p}_baseDeriv.y), 0.001, 0.02);`);
|
|
313
|
+
stmts.push(`let ${p}_frameInvAA = 1.0 / clamp(${p}_baseDeriv, vec2f(1e-5), vec2f(0.02));`);
|
|
314
|
+
stmts.push(`let ${p}_grainUV = (${p}_uv - vec2f(0.5)) * (0.8 / vec2f(length(dpdx(${p}_uv)), length(dpdy(${p}_uv)))) + vec2f(0.5);`);
|
|
315
|
+
stmts.push(`let ${p}_angleRad = radians(${U("angle")});`);
|
|
316
|
+
stmts.push(`let ${p}_uniformDir = vec2f(cos(${p}_angleRad), sin(${p}_angleRad));`);
|
|
317
|
+
stmts.push(`let ${p}_invInradius = 1.0 / ${p}_inradius;`);
|
|
318
|
+
stmts.push(`let ${p}_maxLen = (${p}_outradius + ${p}_reach) * ${p}_invInradius;`);
|
|
319
|
+
stmts.push(`let ${p}_radialLen = ${p}_radius * ${p}_invInradius;`);
|
|
320
|
+
stmts.push(`let ${p}_radialDir = ${p}_fromCenter * ${p}_invInradius * min(1.0, ${p}_maxLen / max(${p}_radialLen, 1e-6));`);
|
|
321
|
+
stmts.push(`let ${p}_bandProximity = smoothstep(${p}_inradius * 0.8, ${p}_inradius, ${p}_radius);`);
|
|
322
|
+
stmts.push(`let ${p}_circleMaxing = ${p}_bandProximity * ${p}_lensCircle * ${p}_lensCircle * ${p}_lensCircle;`);
|
|
323
|
+
stmts.push(`let ${p}_spreadDir = mix(mix(${p}_uniformDir, ${p}_radialDir, ${U("perspective")}), ${p}_radialDir, ${p}_circleMaxing);`);
|
|
324
|
+
stmts.push(`let ${p}_warpedAbs = abs(${p}_baseUV - vec2f(0.5));`);
|
|
325
|
+
stmts.push(`let ${p}_focusCenter = ${U("focusCenter")};`);
|
|
326
|
+
stmts.push(`let ${p}_inner = mix(1.0, smoothstep(0.0, mix(${p}_inradius, ${p}_outradius, ${p}_focusCenter), ${p}_radius), ${p}_focusCenter);`);
|
|
327
|
+
stmts.push(`let ${p}_boxDist = max(${p}_warpedAbs.x, ${p}_warpedAbs.y) * 2.0;`);
|
|
328
|
+
stmts.push(`let ${p}_outer = mix(1.0, 1.0 - min(${p}_boxDist, 1.0), ${U("focusEdges")});`);
|
|
329
|
+
stmts.push(`var ${p}_strength = ${p}_inner * ${p}_outer * mix(1.0, mix(0.15, 0.03, max(-${p}_lensBulge, 0.0)), ${p}_circleMaxing);`);
|
|
330
|
+
stmts.push(`let ${p}_outside = max(${p}_warpedAbs - vec2f(0.5), vec2f(0.0));`);
|
|
331
|
+
stmts.push(`let ${p}_margin = max(${p}_reach * length(${p}_spreadDir) * (1.0 - ${p}_lensCircle), ${p}_edgeAA);`);
|
|
332
|
+
stmts.push(`${p}_strength = ${p}_strength * (1.0 - smoothstep(0.0, ${p}_margin, length(${p}_outside)));`);
|
|
333
|
+
stmts.push(`var ${p}_axis = ${p}_spreadDir * (${p}_reach * ${p}_strength);`);
|
|
334
|
+
stmts.push(`let ${p}_noise = ${U("noise")};`);
|
|
335
|
+
stmts.push(`if (${p}_noise > 0.0) {`);
|
|
336
|
+
{
|
|
337
|
+
const lines = [];
|
|
338
|
+
emitValueNoise(lines, `${p}_fromCenter * (${U("noiseFrequency")} * 18.0) + vec2f(${U("noiseOffset")} * 30.0)`, `${p}_turnNoise`);
|
|
339
|
+
for (const l of lines) stmts.push(` ${l}`);
|
|
340
|
+
}
|
|
341
|
+
stmts.push(` let ${p}_turn = (${p}_turnNoise - 0.5) * 2.0 * ${p}_noise;`);
|
|
342
|
+
stmts.push(` let ${p}_tc = cos(${p}_turn);`);
|
|
343
|
+
stmts.push(` let ${p}_ts = sin(${p}_turn);`);
|
|
344
|
+
stmts.push(` ${p}_axis = vec2f(${p}_tc * ${p}_axis.x + ${p}_ts * ${p}_axis.y, -${p}_ts * ${p}_axis.x + ${p}_tc * ${p}_axis.y);`);
|
|
345
|
+
stmts.push(`}`);
|
|
346
|
+
stmts.push(`${p}_axis = vec2f(${p}_axis.x * ${p}_invAspect, ${p}_axis.y);`);
|
|
347
|
+
stmts.push(`let ${p}_grainMixer = ${U("grainMixer")};`);
|
|
348
|
+
stmts.push(`if (${p}_grainMixer > 0.0) {`);
|
|
349
|
+
{
|
|
350
|
+
const lines = [];
|
|
351
|
+
emitValueNoise(lines, `${p}_grainUV`, `${p}_grainSeed`);
|
|
352
|
+
for (const l of lines) stmts.push(` ${l}`);
|
|
353
|
+
}
|
|
354
|
+
stmts.push(` let ${p}_jit = fract(${p}_grainSeed * vec2f(157.31, 113.57)) * 2.0 - vec2f(1.0);`);
|
|
355
|
+
stmts.push(` ${p}_axis = ${p}_axis + ${p}_jit * (0.3 * ${p}_grainMixer * length(${p}_axis));`);
|
|
356
|
+
stmts.push(`}`);
|
|
357
|
+
stmts.push(`let ${p}_countF = clamp(floor(${U("count")}), 2.0, ${L(MAX_TAPS)});`);
|
|
358
|
+
stmts.push(`let ${p}_hueBase = ${U("dispersionColor")} + 0.5;`);
|
|
359
|
+
stmts.push(`let ${p}_bias = ${U("bias")};`);
|
|
360
|
+
stmts.push(`let ${p}_biasPower = 1.0 + 2.0 * abs(${p}_bias);`);
|
|
361
|
+
stmts.push(`let ${p}_biasNeg = ${p}_bias < 0.0;`);
|
|
362
|
+
stmts.push(`let ${p}_dispShift = ${U("dispersionShift")};`);
|
|
363
|
+
stmts.push(`let ${p}_icMask = 1.0 - smoothstep(0.5 * ${p}_inradius, 1.1 * ${p}_inradius, ${p}_radius);`);
|
|
364
|
+
stmts.push(`let ${p}_dispAmt = ${U("dispersion")} * mix(clamp(1.0 + ${p}_dispShift, 0.0, 1.0), clamp(1.0 - ${p}_dispShift, 0.0, 1.0), ${p}_icMask);`);
|
|
365
|
+
stmts.push(`let ${p}_dispPower = pow(${p}_dispAmt, 0.8);`);
|
|
366
|
+
stmts.push(`let ${p}_warpedRadius = length(${p}_warped);`);
|
|
367
|
+
stmts.push(`let ${p}_swirlAngle = ${U("swirl")} * ${L(.4 * PI)} * ${p}_strength * ${p}_spread * min(1.0, ${p}_inradius / max(${p}_warpedRadius, 1e-4));`);
|
|
368
|
+
stmts.push(`let ${p}_texel = max((${p}_baseDeriv.x + ${p}_baseDeriv.y) * 0.5, 1e-6);`);
|
|
369
|
+
stmts.push(`let ${p}_fanPx = (2.0 * length(${p}_axis) + abs(${p}_swirlAngle) * ${p}_warpedRadius) / ${p}_texel;`);
|
|
370
|
+
stmts.push(`let ${p}_tapsF = clamp(ceil(${p}_fanPx * ${p}_biasPower) + 1.0, 2.0, ${p}_countF);`);
|
|
371
|
+
stmts.push(`let ${p}_invCount = 1.0 / ${p}_tapsF;`);
|
|
372
|
+
stmts.push(`let ${p}_invSpan = 1.0 / max(${p}_tapsF - 1.0, 1.0);`);
|
|
373
|
+
stmts.push(`var ${p}_colorSum = vec3f(0.0);`);
|
|
374
|
+
stmts.push(`var ${p}_weightSum = vec3f(0.0);`);
|
|
375
|
+
stmts.push(`var ${p}_coverSum = 0.0;`);
|
|
376
|
+
const body = [];
|
|
377
|
+
body.push(`let ${p}_layer = f32(${p}_i);`);
|
|
378
|
+
body.push(`let ${p}_hue = ${p}_hueBase + ${p}_layer * ${p}_invCount;`);
|
|
379
|
+
body.push(`let ${p}_t0 = ${p}_layer * ${p}_invSpan;`);
|
|
380
|
+
body.push(`let ${p}_curved = pow(select(${p}_t0, 1.0 - ${p}_t0, ${p}_biasNeg), ${p}_biasPower);`);
|
|
381
|
+
body.push(`let ${p}_spreadT = select(${p}_curved, 1.0 - ${p}_curved, ${p}_biasNeg);`);
|
|
382
|
+
body.push(`let ${p}_fanPos = 1.0 - 2.0 * ${p}_spreadT;`);
|
|
383
|
+
body.push(`let ${p}_tap0 = ${p}_baseUV + ${p}_axis * ${p}_fanPos - ${p}_c;`);
|
|
384
|
+
body.push(`let ${p}_sa = ${p}_swirlAngle * ${p}_fanPos;`);
|
|
385
|
+
body.push(`let ${p}_sc = cos(${p}_sa);`);
|
|
386
|
+
body.push(`let ${p}_ss = sin(${p}_sa);`);
|
|
387
|
+
body.push(`let ${p}_tx = ${p}_tap0.x * ${p}_aspect;`);
|
|
388
|
+
body.push(`let ${p}_sampleUV = vec2f((${p}_sc * ${p}_tx - ${p}_ss * ${p}_tap0.y) * ${p}_invAspect, ${p}_ss * ${p}_tx + ${p}_sc * ${p}_tap0.y) + ${p}_c;`);
|
|
389
|
+
body.push(`let ${p}_lo = clamp(${p}_sampleUV * ${p}_frameInvAA + vec2f(0.5), vec2f(0.0), vec2f(1.0));`);
|
|
390
|
+
body.push(`let ${p}_hi = clamp((vec2f(1.0) - ${p}_sampleUV) * ${p}_frameInvAA + vec2f(0.5), vec2f(0.0), vec2f(1.0));`);
|
|
391
|
+
body.push(`let ${p}_frame = ${p}_lo.x * ${p}_hi.x * ${p}_lo.y * ${p}_hi.y;`);
|
|
392
|
+
body.push(`let ${p}_tapC = textureSampleLevel(tex.$.${texKey}, samp.$.linearClamp, ${p}_sampleUV, 0.0);`);
|
|
393
|
+
body.push(`let ${p}_cover = ${p}_tapC.a * ${p}_frame;`);
|
|
394
|
+
body.push(`let ${p}_overWhite = vec3f(1.0 - ${p}_cover) + ${p}_tapC.rgb * ${p}_frame;`);
|
|
395
|
+
body.push(`let ${p}_hraw = ${p}_hue * 6.0 + vec3f(0.0, 4.0, 2.0);`);
|
|
396
|
+
body.push(`let ${p}_hmod = ${p}_hraw - 6.0 * floor(${p}_hraw / 6.0);`);
|
|
397
|
+
body.push(`let ${p}_hclamped = clamp(abs(${p}_hmod - vec3f(3.0)) - vec3f(1.0), vec3f(0.0), vec3f(1.0));`);
|
|
398
|
+
body.push(`let ${p}_hrgb = ${p}_hclamped * ${p}_hclamped * (vec3f(3.0) - 2.0 * ${p}_hclamped);`);
|
|
399
|
+
body.push(`let ${p}_weight = vec3f(1.0) - ${p}_dispPower * ${p}_hrgb;`);
|
|
400
|
+
body.push(`${p}_colorSum = ${p}_colorSum + ${p}_overWhite * ${p}_weight;`);
|
|
401
|
+
body.push(`${p}_weightSum = ${p}_weightSum + ${p}_weight;`);
|
|
402
|
+
body.push(`${p}_coverSum = ${p}_coverSum + ${p}_cover;`);
|
|
403
|
+
stmts.push(`for (var ${p}_i = 0u; ${p}_i < u32(${p}_tapsF); ${p}_i++) {`);
|
|
404
|
+
for (const b of body) stmts.push(` ${b}`);
|
|
405
|
+
stmts.push(`}`);
|
|
406
|
+
stmts.push(`let ${p}_color = ${p}_colorSum / max(${p}_weightSum, vec3f(1e-4));`);
|
|
407
|
+
stmts.push(`let ${p}_coverAvg = ${p}_coverSum * ${p}_invCount;`);
|
|
408
|
+
stmts.push(`let ${p}_ground = min(${p}_color.r, min(${p}_color.g, ${p}_color.b));`);
|
|
409
|
+
stmts.push(`let ${p}_alpha = max(${p}_coverAvg, 1.0 - ${p}_ground);`);
|
|
410
|
+
stmts.push(`let ${p}_premul = max(${p}_color - vec3f(1.0 - ${p}_alpha), vec3f(0.0));`);
|
|
411
|
+
stmts.push(`var ${p}_out = vec4f(${p}_premul, ${p}_alpha) * ${p}_bulgeFade;`);
|
|
412
|
+
stmts.push(`let ${p}_grainOverlay = ${U("grainOverlay")};`);
|
|
413
|
+
stmts.push(`if (${p}_grainOverlay > 0.0) {`);
|
|
414
|
+
{
|
|
415
|
+
const lines = [];
|
|
416
|
+
const c1 = L(Math.cos(1)), s1 = L(Math.sin(1));
|
|
417
|
+
const c2 = L(Math.cos(2)), s2 = L(Math.sin(2));
|
|
418
|
+
lines.push(`let ${p}_gr1 = vec2f(${c1} * ${p}_grainUV.x - ${s1} * ${p}_grainUV.y, ${s1} * ${p}_grainUV.x + ${c1} * ${p}_grainUV.y) + vec2f(3.0);`);
|
|
419
|
+
lines.push(`let ${p}_gr2 = vec2f(${c2} * ${p}_grainUV.x - ${s2} * ${p}_grainUV.y, ${s2} * ${p}_grainUV.x + ${c2} * ${p}_grainUV.y) + vec2f(-1.0);`);
|
|
420
|
+
emitValueNoise(lines, `${p}_gr1`, `${p}_gn1`);
|
|
421
|
+
emitValueNoise(lines, `${p}_gr2`, `${p}_gn2`);
|
|
422
|
+
lines.push(`let ${p}_grain = pow(mix(${p}_gn1, ${p}_gn2, 0.5), 1.3);`);
|
|
423
|
+
lines.push(`let ${p}_grainV = ${p}_grain * 2.0 - 1.0;`);
|
|
424
|
+
lines.push(`let ${p}_grainStrength = pow(${p}_grainOverlay * abs(${p}_grainV), 0.8) * ${p}_out.a;`);
|
|
425
|
+
lines.push(`${p}_out = vec4f(mix(${p}_out.rgb, vec3f(step(0.0, ${p}_grainV)) * ${p}_out.a, 0.35 * ${p}_grainStrength), ${p}_out.a);`);
|
|
426
|
+
for (const l of lines) stmts.push(` ${l}`);
|
|
427
|
+
}
|
|
428
|
+
stmts.push(`}`);
|
|
429
|
+
for (const s of stmts) ec.statement(s);
|
|
430
|
+
return call(unpremultiplyAlpha, "unpremultiplyAlpha", [expr(`${p}_out`)])._emit(ec);
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
var LensDistortion_default = componentDefinition;
|
|
435
|
+
export { componentDefinition as n, LensDistortion_default as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as animatedTime } from "./porters-
|
|
1
|
+
import { At as mix, Ct as exp, Dt as length, Mt as pow, Ot as max, Rt as sin, St as dot, Ut as data_exports, _t as atan2, bt as cos, et as src_default, ht as abs, in as vec3f, nt as std_exports, on as vec4f, p as call, sn as f32, tn as vec2f, y as vec4, yt as clamp, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { t as animatedTime } from "./porters-DogLzpKT.js";
|
|
3
3
|
import { c as transformPosition } from "./transformations-CsPUHppB.js";
|
|
4
4
|
var TAU = 6.2831853;
|
|
5
5
|
var lensFlareSpectral = src_default.fn([f32], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((t) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as colorStopsPropConfig, m as MAX_COLOR_STOPS, t as animatedTime } from "./porters-
|
|
3
|
-
import { c as hash22, p as noise_exports, y as value12 } from "./noise-
|
|
4
|
-
import { h as sdf_exports } from "./sdf-
|
|
5
|
-
import { d as VOLUMETRIC_FIELD_EXTRA_FIELDS$1, f as sdf3d_exports, n as shapeEffectBoundingBoxDeclaration, t as resolveShapeType } from "./shapeEffectBounds-
|
|
6
|
-
import { n as glass_exports } from "./glass-
|
|
1
|
+
import { At as mix, Et as fract, Gt as arrayOf, H as mixColorsLinear, Mt as pow, Ot as max, Qt as struct, Rt as sin, Tt as floor, U as mixColorsVariants, Ut as data_exports, _ as floatE, _t as atan2, bt as cos, cn as i32, et as src_default, ht as abs, in as vec3f, kt as min, mt as select, nt as std_exports, on as vec4f, p as call, sn as f32, tn as vec2f, yt as clamp, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { h as colorStopsPropConfig, m as MAX_COLOR_STOPS, t as animatedTime } from "./porters-DogLzpKT.js";
|
|
3
|
+
import { c as hash22, p as noise_exports, y as value12 } from "./noise-Cq0KUOSC.js";
|
|
4
|
+
import { h as sdf_exports } from "./sdf-o99ONcMJ.js";
|
|
5
|
+
import { d as VOLUMETRIC_FIELD_EXTRA_FIELDS$1, f as sdf3d_exports, n as shapeEffectBoundingBoxDeclaration, t as resolveShapeType } from "./shapeEffectBounds-Dg4GQ5vW.js";
|
|
6
|
+
import { n as glass_exports } from "./glass-BVqgjSPg.js";
|
|
7
7
|
import { a as transformColor, c as transformPosition, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
8
8
|
var { sdfSpaceUV } = glass_exports;
|
|
9
9
|
var { createSvgSdfSampler, createAnalyticSdfSampler, driveAnalyticSubProps, ANALYTIC_SDF_EXTRA_FIELDS } = sdf_exports;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as animatedTime } from "./porters-
|
|
3
|
-
import { p as noise_exports, s as hash12, y as value12 } from "./noise-
|
|
1
|
+
import { At as mix, Ct as exp, Dt as length, Ot as max, St as dot, Ut as data_exports, d as ZERO, et as src_default, in as vec3f, mt as select, nt as std_exports, on as vec4f, p as call, sn as f32, tn as vec2f, yt as clamp, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { t as animatedTime } from "./porters-DogLzpKT.js";
|
|
3
|
+
import { p as noise_exports, s as hash12, y as value12 } from "./noise-Cq0KUOSC.js";
|
|
4
4
|
import { a as transformColor, c as transformPosition } from "./transformations-CsPUHppB.js";
|
|
5
5
|
const lightLeakRamp = src_default.fn([
|
|
6
6
|
f32,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as unpremultiplyAlpha, Rt as sin, Ut as data_exports, _ as floatE, bt as cos, d as ZERO, et as src_default, nt as std_exports, p as call, sn as f32, tn as vec2f } from "./edges-BZUKQxSE.js";
|
|
2
2
|
import { r as transformAngle } from "./transformations-CsPUHppB.js";
|
|
3
3
|
var rawWeights = Array.from({ length: 32 }, (_, i) => {
|
|
4
4
|
const t = (i / 31 - .5) * 2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as mixColorStopsRuntime, h as colorStopsPropConfig, x as gradientStopsInSpace$1 } from "./porters-
|
|
1
|
+
import { Dt as length, Et as fract, F as colorMixing_exports, Ot as max, Rt as sin, St as dot, Ut as data_exports, Yt as mod, bt as cos, et as src_default, ht as abs, jt as normalize, mt as select, nt as std_exports, p as call, sn as f32, tn as vec2f, y as vec4, yt as clamp } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { S as mixColorStopsRuntime, h as colorStopsPropConfig, x as gradientStopsInSpace$1 } from "./porters-DogLzpKT.js";
|
|
3
3
|
import { a as transformColor, c as transformPosition, o as transformColorSpace, r as transformAngle, s as transformEdges, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
4
4
|
const gradientStopsInSpace = gradientStopsInSpace$1;
|
|
5
5
|
var DEG_TO_RAD = .017453292519943295;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ot as max, Rt as sin, St as dot, Ut as data_exports, bt as cos, d as ZERO, et as src_default, ht as abs, mt as select, nt as std_exports, on as vec4f, p as call, sn as f32, tn as vec2f, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
2
|
import { i as transformBoolean } from "./transformations-CsPUHppB.js";
|
|
3
3
|
var DEG_TO_RAD = Math.PI / 180;
|
|
4
4
|
const linearWipeMask = src_default.fn([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as animatedTime } from "./porters-
|
|
3
|
-
import { h as perlin12d, p as noise_exports } from "./noise-
|
|
4
|
-
import { h as sdf_exports } from "./sdf-
|
|
5
|
-
import { f as sdf3d_exports, n as shapeEffectBoundingBoxDeclaration, t as resolveShapeType } from "./shapeEffectBounds-
|
|
6
|
-
import { n as glass_exports } from "./glass-
|
|
1
|
+
import { At as mix, Dt as length, Mt as pow, Ot as max, Pt as reflect, Rt as sin, Ut as data_exports, _ as floatE, bt as cos, et as src_default, in as vec3f, jt as normalize, mt as select, nt as std_exports, on as vec4f, p as call, sn as f32, tn as vec2f, y as vec4, yt as clamp, zt as smoothstep } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { t as animatedTime } from "./porters-DogLzpKT.js";
|
|
3
|
+
import { h as perlin12d, p as noise_exports } from "./noise-Cq0KUOSC.js";
|
|
4
|
+
import { h as sdf_exports } from "./sdf-o99ONcMJ.js";
|
|
5
|
+
import { f as sdf3d_exports, n as shapeEffectBoundingBoxDeclaration, t as resolveShapeType } from "./shapeEffectBounds-Dg4GQ5vW.js";
|
|
6
|
+
import { n as glass_exports } from "./glass-BVqgjSPg.js";
|
|
7
7
|
import { a as transformColor, c as transformPosition } from "./transformations-CsPUHppB.js";
|
|
8
8
|
var { sdfSpaceUV, offsetUV } = glass_exports;
|
|
9
9
|
var { createSvgSdfSampler, createAnalyticSdfSampler, driveAnalyticSubProps, ANALYTIC_SDF_EXTRA_FIELDS } = sdf_exports;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-
|
|
1
|
+
import { Ct as exp, Gt as arrayOf, N as unpremultiplyAlpha, Qt as struct, Ut as data_exports, c as sampleRemappedExpr, d as ZERO, et as src_default, g as expr, ln as u32, mt as select, n as composeEdgeRemapExpr, nt as std_exports, on as vec4f, ot as textureStore, p as call, qt as textureStorage2d, rn as vec2u, sn as f32, tn as vec2f, yt as clamp } from "./edges-BZUKQxSE.js";
|
|
2
|
+
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-BoeIXi0l.js";
|
|
3
3
|
import { s as transformEdges } from "./transformations-CsPUHppB.js";
|
|
4
4
|
var GRID_SIZE = 64;
|
|
5
5
|
var CELL_COUNT = GRID_SIZE * GRID_SIZE;
|