shaders 3.2.475 → 4.0.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/LICENSE +21 -142
- package/README.md +192 -19
- package/dist/cli.js +2 -2
- package/dist/core/{AngularBlur-Cx1HVeYk.js → AngularBlur-BEBs-lRR.js} +2 -3
- package/dist/core/{Arc-D3FuqnDL.js → Arc-D-WnjM7T.js} +1 -3
- package/dist/core/{Ascii-Dhn0H0LB.js → Ascii-BGPIwMc3.js} +2 -5
- package/dist/core/{Aurora-BUfyvIyq.js → Aurora-DqJBPdMQ.js} +2 -11
- package/dist/core/{BarShift-v3D-9Lx4.js → BarShift-BcCOweUh.js} +2 -3
- package/dist/core/{BarnDoors-C5g6Sbze.js → BarnDoors-B9B-AmCV.js} +2 -3
- package/dist/core/{Beam-CV5g8m92.js → Beam-QG_9OS8I.js} +2 -3
- package/dist/core/{Bend-BFWQSHF7.js → Bend-Cy9VAowL.js} +1 -2
- package/dist/core/{Blob-CLvqov4O.js → Blob-C3txJeW0.js} +2 -10
- package/dist/core/{BlockDissolve-DER9y4PE.js → BlockDissolve-C1SFUys7.js} +2 -3
- package/dist/core/{BlockNoise-DpXWJkDL.js → BlockNoise-Cm3y8hce.js} +2 -4
- package/dist/core/{BlueNoise-CSQPDpkm.js → BlueNoise-BCLObOMm.js} +2 -4
- package/dist/core/{Blur-B-Tg7Sfr.js → Blur-Dg29SnXd.js} +1 -2
- package/dist/core/{Boids-BZo85-QR.js → Boids-rsGsPN5h.js} +2 -5
- package/dist/core/{BokehBlur-B1tY-T6q.js → BokehBlur-rFSFEnb0.js} +2 -3
- package/dist/core/{BrickPattern-DVhe3RgK.js → BrickPattern-DqN6JKEN.js} +2 -3
- package/dist/core/{BrightnessContrast-DBLjHzyE.js → BrightnessContrast-J9fCSBiC.js} +1 -3
- package/dist/core/{BrushedMetal-CpXTd3nZ.js → BrushedMetal-74wSZKjG.js} +3 -8
- package/dist/core/{Bulge-CHcE-9Oo.js → Bulge-BIk0oq8j.js} +1 -2
- package/dist/core/{CRTScreen-CyBtBJS4.js → CRTScreen-hEH-JNRd.js} +2 -3
- package/dist/core/{CarbonFiber-DK-0jUEs.js → CarbonFiber-CZdUDvRU.js} +3 -7
- package/dist/core/{Chalkboard-PmgH_OhS.js → Chalkboard-CClJHqvs.js} +2 -3
- package/dist/core/{ChannelBlur-J3MHHcGy.js → ChannelBlur-BEuEwQOC.js} +1 -2
- package/dist/core/{CheckerWipe-Dj2kjjDA.js → CheckerWipe-KuAWj2qg.js} +2 -3
- package/dist/core/{Checkerboard-eFWETR1S.js → Checkerboard-Rq9ze1W3.js} +2 -3
- package/dist/core/{Chevron-ColsT0Fy.js → Chevron-C1j6X2Ye.js} +2 -3
- package/dist/core/{ChromaFlow-DrdCgPGz.js → ChromaFlow-BgsCUYIl.js} +2 -5
- package/dist/core/{ChromaticAberration-C_It6mLf.js → ChromaticAberration-2_4tjQ0u.js} +2 -4
- package/dist/core/{Chrome-2WZpUHiT.js → Chrome-Be3z6C5i.js} +4 -10
- package/dist/core/{Circle-C-AKxSw4.js → Circle-e_qQI3tU.js} +1 -3
- package/dist/core/{ColorWheel-DfF0tqXE.js → ColorWheel-s5ep1H7d.js} +2 -3
- package/dist/core/{CompressionArtifacts-Zvwlutd7.js → CompressionArtifacts-OE9U9Qrq.js} +1 -3
- package/dist/core/{ConcentricSpin-tC8mylMA.js → ConcentricSpin-CLE_5yCJ.js} +1 -2
- package/dist/core/{ConicGradient-CNYvyjSs.js → ConicGradient-Cji2SgVO.js} +2 -4
- package/dist/core/{ContourLines-C4642NJd.js → ContourLines-wpPK00cF.js} +2 -3
- package/dist/core/{CornerPin-BF5gFRv9.js → CornerPin-gYU0Uf2m.js} +2 -3
- package/dist/core/{Crescent-wC0IwPjx.js → Crescent-viNc7Unp.js} +1 -2
- package/dist/core/{Cross-BO7JQKSq.js → Cross-DyQSsw_k.js} +1 -2
- package/dist/core/{Crystal-BK3ifbmV.js → Crystal-Vjj8azWg.js} +4 -9
- package/dist/core/{CurlNoise-UbI-Zda_.js → CurlNoise-C7PHjDht.js} +2 -4
- package/dist/core/{CursorRipples-rJlfKhyh.js → CursorRipples-BzPPNkA3.js} +3 -39
- package/dist/core/{CursorTrail-BuyQdFKJ.js → CursorTrail-cBj0AuQA.js} +2 -4
- package/dist/core/{DataMosh-C_ZI55Qq.js → DataMosh-5Yr9TyVx.js} +1 -3
- package/dist/core/{DiamondGradient-CPhUCUoq.js → DiamondGradient-DZM7HwF5.js} +2 -4
- package/dist/core/{DiamondWipe-y6uIpJM4.js → DiamondWipe-CqeT7lCt.js} +2 -3
- package/dist/core/{DiffuseBlur-BNxowfOL.js → DiffuseBlur-Y5hSDTZF.js} +2 -3
- package/dist/core/{DisplacementMap-BuM2b1nC.js → DisplacementMap-FobRx5Ie.js} +2 -3
- package/dist/core/{Dither-Bt1qdRag.js → Dither-50rqHpt9.js} +2 -3
- package/dist/core/{DotGrid-DJFnwMVS.js → DotGrid-B6AGLUbR.js} +3 -4
- package/dist/core/{DropShadow-C-IfgfyH.js → DropShadow-CEPpgatB.js} +2 -3
- package/dist/core/{Duotone-DML_9JhJ.js → Duotone-D76Kp7Pb.js} +2 -3
- package/dist/core/{Ellipse-BuNUnN8D.js → Ellipse-BGod1LeG.js} +1 -2
- package/dist/core/{Emboss-DvKk4zwp.js → Emboss-DMNFb_ww.js} +3 -6
- package/dist/core/{Engraving-DPFVnIjD.js → Engraving-Dj7bCATQ.js} +2 -3
- package/dist/core/{ErosionNoise-j_b7a5cl.js → ErosionNoise-4O68wJQZ.js} +2 -4
- package/dist/core/{Exposure-DALA5K55.js → Exposure-h-vapOpj.js} +1 -3
- package/dist/core/{FallingLines-CeMOKpxK.js → FallingLines-Dzop_89k.js} +2 -3
- package/dist/core/{FilmGrain-DsDYCjjs.js → FilmGrain-Bs8PCfdf.js} +1 -3
- package/dist/core/{FilmStock-DtDMkwF6.js → FilmStock-DBjVo6rL.js} +1 -4
- package/dist/core/{Flip-B9Av9MVn.js → Flip-CfrS4KfZ.js} +2 -3
- package/dist/core/{FloatingParticles-BcMOBX1m.js → FloatingParticles-D1R2tD2J.js} +2 -5
- package/dist/core/{FlowField-BunLIU80.js → FlowField-Slirm5AI.js} +2 -3
- package/dist/core/{Flower-CvqBYUCU.js → Flower-Ddlut7QZ.js} +1 -2
- package/dist/core/{FlowingGradient-DQ284uMb.js → FlowingGradient-CwIgTtbj.js} +2 -7
- package/dist/core/{FlutedGlass-BP7av96Y.js → FlutedGlass-CMMy2GJ5.js} +2 -4
- package/dist/core/{Fog-DyyljY9e.js → Fog-DjjUkcTZ.js} +2 -4
- package/dist/core/{Form3D-x-G-Lz4z.js → Form3D-DQDOHWpC.js} +2 -4
- package/dist/core/{FractalNoise-DTgEv-Hq.js → FractalNoise-BjI3IOIj.js} +2 -4
- package/dist/core/{Frost-BhMELsXw.js → Frost-CK12HnL1.js} +3 -8
- package/dist/core/{GaborNoise-B7kmxcRZ.js → GaborNoise-DKEIvvRJ.js} +3 -5
- package/dist/core/{Glass-BMCOKCUL.js → Glass-CzcOVD5Y.js} +3 -8
- package/dist/core/{GlassTiles-DgVooh8h.js → GlassTiles-gjhc563g.js} +1 -2
- package/dist/core/{Glitch-D0pvMdGd.js → Glitch-C_XAWltC.js} +1 -2
- package/dist/core/{Glow-CJ3i0al6.js → Glow-CrYCanBI.js} +1 -3
- package/dist/core/{Godrays-DOV1VQ9x.js → Godrays-BBTMOVLP.js} +2 -3
- package/dist/core/{Goo-sMwsU21Y.js → Goo-Brhjk8aS.js} +3 -8
- package/dist/core/{GradientMap-CCuimQDS.js → GradientMap-C5325QWw.js} +2 -4
- package/dist/core/{Grayscale-DR1xnpde.js → Grayscale-dPjs-wvf.js} +1 -2
- package/dist/core/{Grid-CCUodqje.js → Grid-UjEd3O76.js} +3 -4
- package/dist/core/{GridDistortion-DUnC2Z_Y.js → GridDistortion-vVgYya1U.js} +1 -5
- package/dist/core/{Group--MS8ZNKg.js → Group-KVdmAi5g.js} +1 -1
- package/dist/core/{HTMLInCanvas-D_Rc6bs1.js → HTMLInCanvas-CKr2u76R.js} +1 -2
- package/dist/core/{Halftone-CG1LNQkk.js → Halftone-pRV3TRUW.js} +2 -3
- package/dist/core/{Heart-qPxh2CWp.js → Heart-CX7MvvHZ.js} +1 -2
- package/dist/core/{Heatmap-BZDfR2vC.js → Heatmap-Dn6qyd2e.js} +3 -8
- package/dist/core/{HexGrid-DquaiXLF.js → HexGrid-BIfYhkfV.js} +3 -4
- package/dist/core/{Hologram-JAXPZFx0.js → Hologram-ou27baPQ.js} +3 -7
- package/dist/core/{Holographic-BBHJp93D.js → Holographic-CiHdBSMg.js} +3 -7
- package/dist/core/{HueShift-a1Hl7gFy.js → HueShift-CG7pcXfg.js} +1 -3
- package/dist/core/{ImageTexture-CLW3uX1b.js → ImageTexture-BiZuU58C.js} +1 -2
- package/dist/core/{InkFlow-Dfd_5vYf.js → InkFlow-D9_L7opB.js} +2 -5
- package/dist/core/{Invert-DBEURmcL.js → Invert-CHEaiQZO.js} +1 -2
- package/dist/core/{IrisWipe-DTlGb8v-.js → IrisWipe-x22vOQHm.js} +2 -3
- package/dist/core/Irradiance-7yq2K87_.js +389 -0
- package/dist/core/{IsometricCubes-BgmQXJXU.js → IsometricCubes-CkPGWr7M.js} +2 -3
- package/dist/core/{Kaleidoscope-0adfaQ5F.js → Kaleidoscope-CEC5m1Ww.js} +1 -2
- package/dist/core/{KeyFrames-BqANGVzW.js → KeyFrames-BMGEZsAZ.js} +2 -3
- package/dist/core/{LensDistortion-DVRKCZv8.js → LensDistortion-DKo8PiO5.js} +2 -3
- package/dist/core/{LensFlare-C41jY4jH.js → LensFlare-DMS-NUtK.js} +2 -3
- package/dist/core/LightEdge-DxmnCRls.js +315 -0
- package/dist/core/{LightLeak-GWrDFcI_.js → LightLeak-yoEsZtYg.js} +2 -4
- package/dist/core/{Line-DuV7dLdM.js → Line-D17XDUjO.js} +2 -3
- package/dist/core/{LinearBlur-Bft2CjmO.js → LinearBlur-CiyjPTUH.js} +2 -3
- package/dist/core/{LinearGradient-BzIE4ReW.js → LinearGradient-DfjKG70q.js} +2 -4
- package/dist/core/{LinearWipe-ArRG9OCp.js → LinearWipe-D9CtBg6S.js} +2 -3
- package/dist/core/{LiquidMetal-BgvfhyiQ.js → LiquidMetal-8EG6DwV6.js} +3 -8
- package/dist/core/{Liquify-B6EigQqP.js → Liquify-BySXF1OB.js} +1 -4
- package/dist/core/{MagneticFilings-Dj35dlIq.js → MagneticFilings-DNESH3Zs.js} +2 -5
- package/dist/core/{Marble-0kfSSCDj.js → Marble-C9WvdxrP.js} +2 -7
- package/dist/core/{MeshGradient-DY_rUhFv.js → MeshGradient-d9--RXOU.js} +2 -10
- package/dist/core/{Mirror-C1AIyKmb.js → Mirror-1V2FF2kD.js} +1 -2
- package/dist/core/{MultiPointGradient-B9z1J-d8.js → MultiPointGradient-cRA9ytgL.js} +2 -3
- package/dist/core/{Nebula-mZDwq-yl.js → Nebula-BRV-q74y.js} +4 -87
- package/dist/core/{Neon-CyQE26dS.js → Neon-4PemK9Rj.js} +3 -6
- package/dist/core/{NoiseDissolve-DQbBbxlP.js → NoiseDissolve-B7LgD46G.js} +2 -3
- package/dist/core/{ObjectTracker-CZd20LeZ.js → ObjectTracker-CdzDxhpy.js} +2 -3
- package/dist/core/{Obsidian-CjKezopV.js → Obsidian-2J1eX9kT.js} +3 -9
- package/dist/core/{PagePeel-ulnjqZzc.js → PagePeel-D-ziraOm.js} +1 -2
- package/dist/core/{Paper-c_1INiUk.js → Paper-BxzCLyzB.js} +1 -2
- package/dist/core/{Parallelogram-CnjzV4-0.js → Parallelogram-D4OflTwn.js} +1 -2
- package/dist/core/{ParticleField-yJztI6Ts.js → ParticleField-tWNicEDO.js} +1 -4
- package/dist/core/{ParticleFlow-DJYrNrb8.js → ParticleFlow-BiEYFyWR.js} +2 -6
- package/dist/core/{Particles-kT-8Aj5V.js → Particles-B7W4yWgo.js} +3 -7
- package/dist/core/{PerlinNoise-C_Pczp28.js → PerlinNoise-C-irUxp9.js} +3 -5
- package/dist/core/{Perspective-BrbfuYVk.js → Perspective-DlnAW-pe.js} +2 -3
- package/dist/core/{PixelSort-DoTMcLz4.js → PixelSort-BBOTYuOE.js} +1 -4
- package/dist/core/{PixelThrow-B8pxI6sI.js → PixelThrow-DCJb9Lxd.js} +2 -4
- package/dist/core/{Pixelate-DCU9U9Wb.js → Pixelate-CZdwB--K.js} +1 -2
- package/dist/core/{Plasma-Xe1I1Mmb.js → Plasma-CTOQJeqy.js} +2 -4
- package/dist/core/{Plastic-Ce9dVqPq.js → Plastic-DvyH9x-4.js} +3 -8
- package/dist/core/{PolarCoordinates-mtOsxdGf.js → PolarCoordinates-XhdDAOD0.js} +1 -2
- package/dist/core/{Polygon-Cv63keGU.js → Polygon-CLohB-Ly.js} +2 -4
- package/dist/core/{Posterize-QhGDzUuf.js → Posterize-BAQfnvmK.js} +1 -2
- package/dist/core/{Prism-DOXMcTrS.js → Prism-DJVCVAXX.js} +2 -6
- package/dist/core/{ProgressiveBlur-sSQrxqcr.js → ProgressiveBlur-Dirva1on.js} +2 -3
- package/dist/core/{RadialGradient-DWTDAQnq.js → RadialGradient-DuSKR8Ds.js} +2 -4
- package/dist/core/{RadialWipe-HfofRhY0.js → RadialWipe-n8tON7x2.js} +2 -3
- package/dist/core/{RandomBars-DspX9Utc.js → RandomBars-BYouiIgQ.js} +2 -3
- package/dist/core/{ReactionDiffusion-GsRfnqUY.js → ReactionDiffusion-CHDd3y2q.js} +2 -5
- package/dist/core/{RectangularCoordinates-DhPRrTPT.js → RectangularCoordinates-CYFfCawa.js} +1 -2
- package/dist/core/{ReflectivePlane-ej7XTkZ-.js → ReflectivePlane-DFTl5U9q.js} +2 -3
- package/dist/core/Repeater-CnbzXuAe.js +473 -0
- package/dist/core/{Ring-CC1LC05E.js → Ring-CGkHVSVd.js} +1 -2
- package/dist/core/{RippleWipe-CmmIx59a.js → RippleWipe-DLjPzY6u.js} +2 -3
- package/dist/core/{Ripples-ColS9_ej.js → Ripples-C2tITU62.js} +2 -3
- package/dist/core/{RoundedRect-BCL_4FLA.js → RoundedRect-sfNTUaCY.js} +1 -2
- package/dist/core/{Saturation-E77lSl0T.js → Saturation-BRkifYWj.js} +1 -3
- package/dist/core/{Scratches-ZHohp7K4.js → Scratches-D87O5C2K.js} +2 -4
- package/dist/core/{Sharpness-CgNxIvCA.js → Sharpness-BGv613Zw.js} +1 -3
- package/dist/core/Shatter-DuyCFU1f.js +328 -0
- package/dist/core/{SimplexNoise-CZf812YP.js → SimplexNoise-CQJvmqd-.js} +2 -4
- package/dist/core/{SineWave-CVHPlsdX.js → SineWave-BfOgSGMP.js} +2 -3
- package/dist/core/{SliceWipe-4Y_DLO0N.js → SliceWipe-CD_D99sl.js} +1 -2
- package/dist/core/{Smoke-CzjvGgBl.js → Smoke-BDQYKRP1.js} +2 -4
- package/dist/core/{SmokeFill-DkMjXE-D.js → SmokeFill-CPnzQtQv.js} +3 -8
- package/dist/core/{SmokeFlow-DQMNHV2s.js → SmokeFlow-BkPMjZq8.js} +2 -4
- package/dist/core/{Solarize-DmhOkKoO.js → Solarize-DSiS32QS.js} +1 -3
- package/dist/core/{SolidColor-CyYoqgG3.js → SolidColor-DEKpgy1c.js} +2 -3
- package/dist/core/Sparkle-BZur6gPW.js +178 -0
- package/dist/core/{Spherize-D2gNetxE.js → Spherize-D9Yg4n6O.js} +2 -3
- package/dist/core/{Spiral-BCO6OJXU.js → Spiral-BCacfEpT.js} +2 -3
- package/dist/core/{Star-9JERbdHT.js → Star-Dnw1ihk7.js} +1 -2
- package/dist/core/{Stone-92McvPwz.js → Stone-Cje-_vAg.js} +1 -3
- package/dist/core/{Strands-B6NfRExJ.js → Strands-CFRxS1G_.js} +2 -4
- package/dist/core/{Stretch-DbUOkCav.js → Stretch-DXVhfIqO.js} +1 -2
- package/dist/core/{Stripes-BG2zbwGV.js → Stripes-CCADWwyq.js} +2 -3
- package/dist/core/{StudioBackground-tpZpD080.js → StudioBackground-BlzYNAsu.js} +2 -6
- package/dist/core/{SunBurst-BMH4MKRL.js → SunBurst-CmWbI18r.js} +2 -3
- package/dist/core/{Surface3D-DUZMTBel.js → Surface3D-Dmh98-0V.js} +2 -6
- package/dist/core/{Swirl-CzOPAKx8.js → Swirl-CzI1qSVc.js} +2 -4
- package/dist/core/{Teardrop-aOr2VYQI.js → Teardrop-D24uulL0.js} +1 -2
- package/dist/core/{Text-CV3Lr3m0.js → Text-CrZKvBw6.js} +2 -6
- package/dist/core/{ThinFilm-CYOodpsx.js → ThinFilm-D7R2dt1O.js} +3 -6
- package/dist/core/{TiltShift-Cv80ZHW3.js → TiltShift-AMMDZBvf.js} +2 -3
- package/dist/core/{TimeTrail-fvJO2a1q.js → TimeTrail-BCYDP2ep.js} +2 -6
- package/dist/core/{Tint-D4m85tFF.js → Tint-DHb5wBN5.js} +2 -3
- package/dist/core/{Trapezoid-B-PkXCCJ.js → Trapezoid-CL5Fxvq7.js} +1 -2
- package/dist/core/{TriangularGrid-hMfK10up.js → TriangularGrid-Bp-SJS-H.js} +2 -3
- package/dist/core/{Tritone-n1wNQ1dI.js → Tritone-C0nx7OdC.js} +2 -3
- package/dist/core/{Truchet-BhmcbIE9.js → Truchet-DCetyDaq.js} +2 -3
- package/dist/core/{Twirl-D8gALHXr.js → Twirl-D_mv9KEi.js} +1 -2
- package/dist/core/{VHS-CaqSB2Op.js → VHS-Cp9aDjti.js} +1 -2
- package/dist/core/{VenetianBlinds-B1-WjIeY.js → VenetianBlinds-DUyvaT5w.js} +2 -3
- package/dist/core/{Vesica-Gh1CMA7n.js → Vesica-BpzrTPTA.js} +1 -2
- package/dist/core/{Vibrance-ixBSdj4B.js → Vibrance-DW3J-pvW.js} +1 -3
- package/dist/core/{VideoTexture-DVQ1YsW2.js → VideoTexture-zoKsSrex.js} +1 -2
- package/dist/core/{Vignette-B9v8l0So.js → Vignette-KKbP3qdZ.js} +2 -5
- package/dist/core/{Voronoi-CIHogO9V.js → Voronoi-Bp2-U6lm.js} +2 -5
- package/dist/core/Voxels-B3e3LHH5.js +469 -0
- package/dist/core/{Water-Dh4UB4UF.js → Water-CoYwvqKx.js} +3 -8
- package/dist/core/{Watercolor-C70_K8Lv.js → Watercolor-DUNjSIN1.js} +2 -4
- package/dist/core/{WaveDistortion-BCKxUa-p.js → WaveDistortion-Dp8ws0z1.js} +1 -2
- package/dist/core/{Waveform-BKMFhH8R.js → Waveform-DDBLB6zu.js} +2 -9
- package/dist/core/{WaveletNoise-CFpncHiR.js → WaveletNoise-CpBkzfRT.js} +2 -4
- package/dist/core/{Weave-CYgbepeB.js → Weave-cWkvSEAy.js} +2 -3
- package/dist/core/{WebcamTexture-B0vkMk_l.js → WebcamTexture-D484SXSE.js} +1 -2
- package/dist/core/{Wool-CLkJUMng.js → Wool-C9L7O9fD.js} +1 -3
- package/dist/core/{WorleyNoise-BxznxOxV.js → WorleyNoise-B5j5lDQZ.js} +2 -3
- package/dist/core/{ZoomBlur-DtujxMsW.js → ZoomBlur-bPC1dBu2.js} +2 -3
- package/dist/core/customShaders.d.ts +71 -0
- package/dist/core/customShaders.d.ts.map +1 -0
- package/dist/core/docs-manifest.json +29177 -0
- package/dist/core/gpu/composer.d.ts +2 -0
- package/dist/core/gpu/composer.d.ts.map +1 -1
- package/dist/core/gpu/contract.d.ts +15 -0
- package/dist/core/gpu/contract.d.ts.map +1 -1
- package/dist/core/gpu/frame.d.ts +5 -2
- package/dist/core/gpu/frame.d.ts.map +1 -1
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/gpu/kit/waves.d.ts +6 -0
- package/dist/core/gpu/kit/waves.d.ts.map +1 -1
- package/dist/core/gpu/scaffolds/sdfShape.d.ts +1 -1
- package/dist/core/gpu/scaffolds/sdfShape.d.ts.map +1 -1
- package/dist/core/gpu/support.d.ts +12 -0
- package/dist/core/gpu/support.d.ts.map +1 -1
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +238 -255
- package/dist/core/llms.txt +1558 -0
- package/dist/core/{noiseColor-_P7nIu_L.js → noiseColor-D_bPhJ4m.js} +2 -2
- package/dist/core/presetRenderer.d.ts +4 -0
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +204 -248
- package/dist/core/shaderRegistry-BaozBFyh.js +445 -0
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.d.ts +1 -1
- package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +4 -10
- package/dist/core/shaders/Arc/index.js +4 -6
- package/dist/core/shaders/Ascii/index.d.ts +1 -1
- package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
- package/dist/core/shaders/Ascii/index.js +4 -11
- package/dist/core/shaders/Aurora/index.js +4 -21
- package/dist/core/shaders/BarShift/index.js +4 -8
- package/dist/core/shaders/BarnDoors/index.js +4 -7
- package/dist/core/shaders/Beam/index.js +4 -11
- package/dist/core/shaders/Bend/index.js +4 -8
- package/dist/core/shaders/Blob/index.js +4 -18
- package/dist/core/shaders/BlockDissolve/index.js +4 -7
- package/dist/core/shaders/BlockNoise/index.d.ts +1 -1
- package/dist/core/shaders/BlockNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/BlockNoise/index.js +5 -14
- package/dist/core/shaders/BlueNoise/index.d.ts +1 -1
- package/dist/core/shaders/BlueNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/BlueNoise/index.js +5 -14
- package/dist/core/shaders/Blur/index.d.ts +1 -1
- package/dist/core/shaders/Blur/index.d.ts.map +1 -1
- package/dist/core/shaders/Blur/index.js +4 -10
- package/dist/core/shaders/Boids/index.js +4 -9
- package/dist/core/shaders/BokehBlur/index.js +4 -10
- package/dist/core/shaders/BrickPattern/index.d.ts +1 -1
- package/dist/core/shaders/BrickPattern/index.d.ts.map +1 -1
- package/dist/core/shaders/BrickPattern/index.js +4 -13
- package/dist/core/shaders/BrightnessContrast/index.js +4 -7
- package/dist/core/shaders/BrushedMetal/index.js +4 -11
- package/dist/core/shaders/Bulge/index.js +4 -8
- package/dist/core/shaders/CRTScreen/index.d.ts +2 -2
- package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
- package/dist/core/shaders/CRTScreen/index.js +4 -10
- package/dist/core/shaders/CarbonFiber/index.js +4 -11
- package/dist/core/shaders/Chalkboard/index.d.ts +1 -1
- package/dist/core/shaders/Chalkboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Chalkboard/index.js +4 -9
- package/dist/core/shaders/ChannelBlur/index.d.ts +1 -1
- package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +4 -10
- package/dist/core/shaders/CheckerWipe/index.js +4 -7
- package/dist/core/shaders/Checkerboard/index.d.ts +1 -1
- package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Checkerboard/index.js +4 -13
- package/dist/core/shaders/Chevron/index.d.ts +1 -1
- package/dist/core/shaders/Chevron/index.d.ts.map +1 -1
- package/dist/core/shaders/Chevron/index.js +4 -13
- package/dist/core/shaders/ChromaFlow/index.js +4 -8
- package/dist/core/shaders/ChromaticAberration/index.js +4 -11
- package/dist/core/shaders/Chrome/index.js +4 -10
- package/dist/core/shaders/Circle/index.js +4 -6
- package/dist/core/shaders/ColorWheel/index.js +4 -11
- package/dist/core/shaders/CompressionArtifacts/index.js +4 -7
- package/dist/core/shaders/ConcentricSpin/index.js +4 -8
- package/dist/core/shaders/ConicGradient/index.js +4 -11
- package/dist/core/shaders/ContourLines/index.js +4 -6
- package/dist/core/shaders/CornerPin/index.js +4 -8
- package/dist/core/shaders/Crescent/index.js +4 -5
- package/dist/core/shaders/Cross/index.js +4 -5
- package/dist/core/shaders/Crystal/index.js +4 -11
- package/dist/core/shaders/CurlNoise/index.d.ts +1 -1
- package/dist/core/shaders/CurlNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/CurlNoise/index.js +5 -14
- package/dist/core/shaders/CursorRipples/index.js +4 -7
- package/dist/core/shaders/CursorTrail/index.js +4 -7
- package/dist/core/shaders/DataMosh/index.js +4 -7
- package/dist/core/shaders/DiamondGradient/index.js +4 -11
- package/dist/core/shaders/DiamondWipe/index.js +4 -7
- package/dist/core/shaders/DiffuseBlur/index.d.ts +1 -1
- package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +4 -10
- package/dist/core/shaders/DisplacementMap/index.js +4 -8
- package/dist/core/shaders/Dither/index.d.ts +1 -1
- package/dist/core/shaders/Dither/index.d.ts.map +1 -1
- package/dist/core/shaders/Dither/index.js +4 -13
- package/dist/core/shaders/DotGrid/index.d.ts +2 -2
- package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/DotGrid/index.js +4 -13
- package/dist/core/shaders/DropShadow/index.d.ts +1 -1
- package/dist/core/shaders/DropShadow/index.d.ts.map +1 -1
- package/dist/core/shaders/DropShadow/index.js +4 -10
- package/dist/core/shaders/Duotone/index.js +4 -6
- package/dist/core/shaders/Ellipse/index.js +4 -5
- package/dist/core/shaders/Emboss/index.js +4 -9
- package/dist/core/shaders/Engraving/index.js +4 -9
- package/dist/core/shaders/ErosionNoise/index.d.ts +1 -1
- package/dist/core/shaders/ErosionNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/ErosionNoise/index.js +5 -14
- package/dist/core/shaders/Exposure/index.js +4 -7
- package/dist/core/shaders/FallingLines/index.d.ts +1 -1
- package/dist/core/shaders/FallingLines/index.d.ts.map +1 -1
- package/dist/core/shaders/FallingLines/index.js +4 -13
- package/dist/core/shaders/FilmGrain/index.js +4 -7
- package/dist/core/shaders/FilmStock/index.js +4 -13
- package/dist/core/shaders/Flip/index.js +4 -8
- package/dist/core/shaders/FloatingParticles/index.d.ts +1 -1
- package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +4 -9
- package/dist/core/shaders/FlowField/index.js +4 -8
- package/dist/core/shaders/Flower/index.js +4 -5
- package/dist/core/shaders/FlowingGradient/index.js +4 -15
- package/dist/core/shaders/FlutedGlass/index.js +4 -11
- package/dist/core/shaders/Fog/index.js +4 -7
- package/dist/core/shaders/Form3D/index.js +4 -7
- package/dist/core/shaders/FractalNoise/index.d.ts +1 -1
- package/dist/core/shaders/FractalNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/FractalNoise/index.js +4 -13
- package/dist/core/shaders/Frost/index.js +4 -11
- package/dist/core/shaders/GaborNoise/index.d.ts +2 -2
- package/dist/core/shaders/GaborNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/GaborNoise/index.js +5 -14
- package/dist/core/shaders/Glass/index.js +4 -11
- package/dist/core/shaders/GlassTiles/index.d.ts +1 -1
- package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
- package/dist/core/shaders/GlassTiles/index.js +4 -8
- 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 -10
- package/dist/core/shaders/Glow/index.d.ts +1 -1
- package/dist/core/shaders/Glow/index.d.ts.map +1 -1
- package/dist/core/shaders/Glow/index.js +4 -11
- package/dist/core/shaders/Godrays/index.js +4 -12
- package/dist/core/shaders/Goo/index.js +4 -11
- package/dist/core/shaders/GradientMap/index.js +4 -7
- package/dist/core/shaders/Grayscale/index.js +4 -6
- package/dist/core/shaders/Grid/index.d.ts +2 -2
- package/dist/core/shaders/Grid/index.d.ts.map +1 -1
- package/dist/core/shaders/Grid/index.js +4 -13
- package/dist/core/shaders/GridDistortion/index.js +4 -11
- package/dist/core/shaders/Group/index.js +4 -6
- package/dist/core/shaders/HTMLInCanvas/index.js +4 -7
- package/dist/core/shaders/Halftone/index.d.ts +1 -1
- package/dist/core/shaders/Halftone/index.d.ts.map +1 -1
- package/dist/core/shaders/Halftone/index.js +4 -13
- package/dist/core/shaders/Heart/index.js +4 -5
- package/dist/core/shaders/Heatmap/index.js +4 -11
- package/dist/core/shaders/HexGrid/index.d.ts +2 -2
- package/dist/core/shaders/HexGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/HexGrid/index.js +4 -13
- package/dist/core/shaders/Hologram/index.js +4 -10
- package/dist/core/shaders/Holographic/index.js +4 -10
- package/dist/core/shaders/HueShift/index.js +4 -7
- package/dist/core/shaders/ImageTexture/index.js +4 -6
- package/dist/core/shaders/InkFlow/index.js +4 -8
- package/dist/core/shaders/Invert/index.js +4 -6
- package/dist/core/shaders/IrisWipe/index.js +4 -7
- package/dist/core/shaders/Irradiance/index.js +4 -13
- package/dist/core/shaders/IsometricCubes/index.d.ts +1 -1
- package/dist/core/shaders/IsometricCubes/index.d.ts.map +1 -1
- package/dist/core/shaders/IsometricCubes/index.js +4 -13
- package/dist/core/shaders/Kaleidoscope/index.js +4 -8
- package/dist/core/shaders/KeyFrames/index.js +4 -10
- package/dist/core/shaders/LensDistortion/index.js +4 -6
- package/dist/core/shaders/LensFlare/index.d.ts +1 -1
- package/dist/core/shaders/LensFlare/index.d.ts.map +1 -1
- package/dist/core/shaders/LensFlare/index.js +4 -12
- package/dist/core/shaders/LightEdge/index.js +4 -10
- package/dist/core/shaders/LightLeak/index.js +4 -12
- package/dist/core/shaders/Line/index.js +4 -10
- package/dist/core/shaders/LinearBlur/index.d.ts +1 -1
- package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearBlur/index.js +4 -10
- package/dist/core/shaders/LinearGradient/index.js +4 -11
- package/dist/core/shaders/LinearWipe/index.js +4 -7
- package/dist/core/shaders/LiquidMetal/index.js +4 -11
- package/dist/core/shaders/Liquify/index.js +4 -10
- package/dist/core/shaders/MagneticFilings/index.js +4 -9
- package/dist/core/shaders/Marble/index.d.ts +1 -1
- package/dist/core/shaders/Marble/index.d.ts.map +1 -1
- package/dist/core/shaders/Marble/index.js +4 -15
- package/dist/core/shaders/MeshGradient/index.js +4 -17
- package/dist/core/shaders/Mirror/index.js +4 -8
- package/dist/core/shaders/MultiPointGradient/index.js +4 -11
- package/dist/core/shaders/Nebula/index.js +4 -13
- package/dist/core/shaders/Neon/index.js +4 -9
- package/dist/core/shaders/NoiseDissolve/index.js +4 -7
- package/dist/core/shaders/ObjectTracker/index.js +4 -10
- package/dist/core/shaders/Obsidian/index.js +4 -15
- package/dist/core/shaders/PagePeel/index.js +4 -10
- package/dist/core/shaders/Paper/index.d.ts +1 -1
- package/dist/core/shaders/Paper/index.d.ts.map +1 -1
- package/dist/core/shaders/Paper/index.js +4 -8
- package/dist/core/shaders/Parallelogram/index.js +4 -5
- package/dist/core/shaders/ParticleField/index.js +4 -9
- package/dist/core/shaders/ParticleFlow/index.js +4 -10
- package/dist/core/shaders/Particles/index.js +4 -9
- package/dist/core/shaders/PerlinNoise/index.d.ts +2 -2
- package/dist/core/shaders/PerlinNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/PerlinNoise/index.js +5 -14
- package/dist/core/shaders/Perspective/index.js +4 -8
- package/dist/core/shaders/PixelSort/index.js +4 -8
- package/dist/core/shaders/PixelThrow/index.js +4 -8
- package/dist/core/shaders/Pixelate/index.d.ts +1 -1
- package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
- package/dist/core/shaders/Pixelate/index.js +4 -10
- package/dist/core/shaders/Plasma/index.js +4 -11
- package/dist/core/shaders/Plastic/index.js +4 -11
- package/dist/core/shaders/PolarCoordinates/index.js +4 -8
- package/dist/core/shaders/Polygon/index.js +4 -6
- package/dist/core/shaders/Posterize/index.js +4 -6
- package/dist/core/shaders/Prism/index.js +4 -12
- package/dist/core/shaders/ProgressiveBlur/index.d.ts +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +4 -10
- package/dist/core/shaders/RadialGradient/index.js +4 -11
- package/dist/core/shaders/RadialWipe/index.js +4 -7
- package/dist/core/shaders/RandomBars/index.js +4 -7
- package/dist/core/shaders/ReactionDiffusion/index.js +4 -8
- package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
- package/dist/core/shaders/ReflectivePlane/index.js +4 -10
- package/dist/core/shaders/Repeater/index.js +4 -5
- package/dist/core/shaders/Ring/index.js +4 -5
- package/dist/core/shaders/RippleWipe/index.js +4 -7
- package/dist/core/shaders/Ripples/index.d.ts +1 -1
- package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
- package/dist/core/shaders/Ripples/index.js +4 -13
- package/dist/core/shaders/RoundedRect/index.js +4 -5
- package/dist/core/shaders/Saturation/index.js +4 -7
- package/dist/core/shaders/Scratches/index.d.ts +1 -1
- package/dist/core/shaders/Scratches/index.d.ts.map +1 -1
- package/dist/core/shaders/Scratches/index.js +5 -14
- package/dist/core/shaders/Sharpness/index.d.ts +1 -1
- package/dist/core/shaders/Sharpness/index.d.ts.map +1 -1
- package/dist/core/shaders/Sharpness/index.js +4 -11
- package/dist/core/shaders/Shatter/index.js +4 -6
- package/dist/core/shaders/SimplexNoise/index.d.ts +1 -1
- package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +5 -14
- package/dist/core/shaders/SineWave/index.js +4 -10
- package/dist/core/shaders/SliceWipe/index.js +4 -8
- package/dist/core/shaders/Smoke/index.js +4 -7
- package/dist/core/shaders/SmokeFill/index.js +4 -10
- package/dist/core/shaders/SmokeFlow/index.js +4 -7
- package/dist/core/shaders/Solarize/index.js +4 -7
- package/dist/core/shaders/SolidColor/index.js +4 -11
- package/dist/core/shaders/Sparkle/index.d.ts +57 -0
- package/dist/core/shaders/Sparkle/index.d.ts.map +1 -0
- package/dist/core/shaders/Sparkle/index.js +5 -0
- package/dist/core/shaders/Spherize/index.d.ts +1 -1
- package/dist/core/shaders/Spherize/index.d.ts.map +1 -1
- package/dist/core/shaders/Spherize/index.js +4 -10
- package/dist/core/shaders/Spiral/index.js +4 -11
- package/dist/core/shaders/Star/index.js +4 -5
- package/dist/core/shaders/Stone/index.d.ts +1 -1
- package/dist/core/shaders/Stone/index.d.ts.map +1 -1
- package/dist/core/shaders/Stone/index.js +4 -14
- package/dist/core/shaders/Strands/index.d.ts +1 -1
- package/dist/core/shaders/Strands/index.d.ts.map +1 -1
- package/dist/core/shaders/Strands/index.js +4 -13
- package/dist/core/shaders/Stretch/index.js +4 -8
- package/dist/core/shaders/Stripes/index.d.ts +1 -1
- package/dist/core/shaders/Stripes/index.d.ts.map +1 -1
- package/dist/core/shaders/Stripes/index.js +4 -13
- package/dist/core/shaders/StudioBackground/index.js +4 -14
- package/dist/core/shaders/SunBurst/index.js +4 -12
- package/dist/core/shaders/Surface3D/index.js +4 -8
- package/dist/core/shaders/Swirl/index.js +4 -11
- package/dist/core/shaders/Teardrop/index.js +4 -5
- package/dist/core/shaders/Text/index.js +4 -12
- package/dist/core/shaders/ThinFilm/index.js +4 -9
- package/dist/core/shaders/TiltShift/index.d.ts +1 -1
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +4 -10
- package/dist/core/shaders/TimeTrail/index.js +4 -8
- package/dist/core/shaders/Tint/index.js +4 -6
- package/dist/core/shaders/Trapezoid/index.js +4 -5
- package/dist/core/shaders/TriangularGrid/index.d.ts +1 -1
- package/dist/core/shaders/TriangularGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/TriangularGrid/index.js +4 -13
- package/dist/core/shaders/Tritone/index.js +4 -6
- package/dist/core/shaders/Truchet/index.d.ts +1 -1
- package/dist/core/shaders/Truchet/index.d.ts.map +1 -1
- package/dist/core/shaders/Truchet/index.js +4 -13
- package/dist/core/shaders/Twirl/index.js +4 -8
- package/dist/core/shaders/VHS/index.d.ts +1 -1
- package/dist/core/shaders/VHS/index.d.ts.map +1 -1
- package/dist/core/shaders/VHS/index.js +4 -10
- package/dist/core/shaders/VenetianBlinds/index.js +4 -7
- package/dist/core/shaders/Vesica/index.js +4 -5
- package/dist/core/shaders/Vibrance/index.js +4 -7
- package/dist/core/shaders/VideoTexture/index.js +4 -6
- package/dist/core/shaders/Vignette/index.js +4 -8
- package/dist/core/shaders/Voronoi/index.d.ts +1 -1
- package/dist/core/shaders/Voronoi/index.d.ts.map +1 -1
- package/dist/core/shaders/Voronoi/index.js +4 -13
- package/dist/core/shaders/Voxels/index.js +4 -14
- package/dist/core/shaders/Water/index.js +4 -11
- 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 +4 -10
- package/dist/core/shaders/WaveDistortion/index.js +4 -8
- package/dist/core/shaders/Waveform/index.js +4 -16
- package/dist/core/shaders/WaveletNoise/index.d.ts +1 -1
- package/dist/core/shaders/WaveletNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/WaveletNoise/index.js +5 -14
- package/dist/core/shaders/Weave/index.d.ts +1 -1
- package/dist/core/shaders/Weave/index.d.ts.map +1 -1
- package/dist/core/shaders/Weave/index.js +4 -13
- package/dist/core/shaders/WebcamTexture/index.js +4 -6
- package/dist/core/shaders/Wool/index.d.ts +1 -1
- package/dist/core/shaders/Wool/index.d.ts.map +1 -1
- package/dist/core/shaders/Wool/index.js +4 -14
- package/dist/core/shaders/WorleyNoise/index.d.ts +1 -1
- package/dist/core/shaders/WorleyNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/WorleyNoise/index.js +4 -13
- package/dist/core/shaders/ZoomBlur/index.d.ts +1 -1
- package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +4 -10
- package/dist/core/std/effects/blurs.d.ts +656 -138
- package/dist/core/std/effects/blurs.d.ts.map +1 -1
- package/dist/core/std/effects/color.d.ts +209 -32
- package/dist/core/std/effects/color.d.ts.map +1 -1
- package/dist/core/std/effects/edgeGlow.d.ts +86 -17
- package/dist/core/std/effects/edgeGlow.d.ts.map +1 -1
- package/dist/core/std/effects/fracture.d.ts +72 -8
- package/dist/core/std/effects/fracture.d.ts.map +1 -1
- package/dist/core/std/effects/index.d.ts +15 -0
- package/dist/core/std/effects/index.d.ts.map +1 -0
- package/dist/core/std/effects/instances.d.ts +87 -8
- package/dist/core/std/effects/instances.d.ts.map +1 -1
- package/dist/core/std/effects/lens.d.ts +48 -12
- package/dist/core/std/effects/lens.d.ts.map +1 -1
- package/dist/core/std/effects/overlay.d.ts +63 -22
- package/dist/core/std/effects/overlay.d.ts.map +1 -1
- package/dist/core/std/effects/pointerFields.d.ts +45 -20
- package/dist/core/std/effects/pointerFields.d.ts.map +1 -1
- package/dist/core/std/effects/reveal.d.ts +118 -40
- package/dist/core/std/effects/reveal.d.ts.map +1 -1
- package/dist/core/std/effects/stylize.d.ts +139 -70
- package/dist/core/std/effects/stylize.d.ts.map +1 -1
- package/dist/core/std/filter.d.ts +72 -12
- package/dist/core/std/filter.d.ts.map +1 -1
- package/dist/core/std/frames.d.ts +91 -24
- package/dist/core/std/frames.d.ts.map +1 -1
- package/dist/core/std/index.d.ts +46 -8
- package/dist/core/std/index.d.ts.map +1 -1
- package/dist/core/std/index.js +4 -0
- package/dist/core/std/invoke.d.ts +107 -12
- package/dist/core/std/invoke.d.ts.map +1 -1
- package/dist/core/std/lists.d.ts +40 -10
- package/dist/core/std/lists.d.ts.map +1 -1
- package/dist/core/std/lower.d.ts +73 -1
- package/dist/core/std/lower.d.ts.map +1 -1
- package/dist/core/std/mask.d.ts +60 -17
- package/dist/core/std/mask.d.ts.map +1 -1
- package/dist/core/std/math.d.ts +484 -9
- package/dist/core/std/math.d.ts.map +1 -1
- package/dist/core/std/motion.d.ts +130 -10
- package/dist/core/std/motion.d.ts.map +1 -1
- package/dist/core/std/paint/compose.d.ts +57 -16
- package/dist/core/std/paint/compose.d.ts.map +1 -1
- package/dist/core/std/paint/fields.d.ts +376 -93
- package/dist/core/std/paint/fields.d.ts.map +1 -1
- package/dist/core/std/paint/figures.d.ts +32 -17
- package/dist/core/std/paint/figures.d.ts.map +1 -1
- package/dist/core/std/paint/gradients.d.ts +58 -25
- package/dist/core/std/paint/gradients.d.ts.map +1 -1
- package/dist/core/std/paint/light.d.ts +501 -77
- package/dist/core/std/paint/light.d.ts.map +1 -1
- package/dist/core/std/paint/materials.d.ts +678 -151
- package/dist/core/std/paint/materials.d.ts.map +1 -1
- package/dist/core/std/paint/media.d.ts +47 -32
- package/dist/core/std/paint/media.d.ts.map +1 -1
- package/dist/core/std/paint/noise.d.ts +436 -87
- package/dist/core/std/paint/noise.d.ts.map +1 -1
- package/dist/core/std/paint/patterns.d.ts +473 -91
- package/dist/core/std/paint/patterns.d.ts.map +1 -1
- package/dist/core/std/paint/radiance.d.ts +75 -29
- package/dist/core/std/paint/radiance.d.ts.map +1 -1
- package/dist/core/std/paint/volume.d.ts +68 -27
- package/dist/core/std/paint/volume.d.ts.map +1 -1
- package/dist/core/std/paint/voxels.d.ts +46 -26
- package/dist/core/std/paint/voxels.d.ts.map +1 -1
- package/dist/core/std/shape.d.ts +195 -1
- package/dist/core/std/shape.d.ts.map +1 -1
- package/dist/core/std/signal.d.ts +55 -15
- package/dist/core/std/signal.d.ts.map +1 -1
- package/dist/core/std/sim/agentForces.d.ts +441 -99
- package/dist/core/std/sim/agentForces.d.ts.map +1 -1
- package/dist/core/std/sim/agentFrame.d.ts +94 -20
- package/dist/core/std/sim/agentFrame.d.ts.map +1 -1
- package/dist/core/std/sim/agentRender.d.ts +187 -60
- package/dist/core/std/sim/agentRender.d.ts.map +1 -1
- package/dist/core/std/sim/agents.d.ts +99 -28
- package/dist/core/std/sim/agents.d.ts.map +1 -1
- package/dist/core/std/sim/feedback.d.ts +40 -19
- package/dist/core/std/sim/feedback.d.ts.map +1 -1
- package/dist/core/std/sim/fluids.d.ts +127 -63
- package/dist/core/std/sim/fluids.d.ts.map +1 -1
- package/dist/core/std/sim/grids.d.ts +200 -48
- package/dist/core/std/sim/grids.d.ts.map +1 -1
- package/dist/core/std/sim/index.d.ts +14 -0
- package/dist/core/std/sim/index.d.ts.map +1 -0
- package/dist/core/std/sim/shapeFields.d.ts +56 -0
- package/dist/core/std/sim/shapeFields.d.ts.map +1 -1
- package/dist/core/std/sim.d.ts +112 -10
- package/dist/core/std/sim.d.ts.map +1 -1
- package/dist/core/std/slots.d.ts +72 -6
- package/dist/core/std/slots.d.ts.map +1 -1
- package/dist/core/std/types.d.ts +97 -60
- package/dist/core/std/types.d.ts.map +1 -1
- package/dist/core/std/values.d.ts +33 -14
- package/dist/core/std/values.d.ts.map +1 -1
- package/dist/core/std/warps.d.ts +221 -76
- package/dist/core/std/warps.d.ts.map +1 -1
- package/dist/core/std/wgsl.d.ts +115 -0
- package/dist/core/std/wgsl.d.ts.map +1 -0
- package/dist/core/std-ClftfWpF.js +218889 -0
- package/dist/core/{support-GJphyuEe.js → support-D3W86vgR.js} +11 -1
- package/dist/core/telemetry/index.js +1 -1
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +182 -180
- package/dist/js/createShader.d.ts.map +1 -1
- package/dist/js/createShader.js +4 -3
- package/dist/js/types.d.ts +5 -0
- package/dist/js/types.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.js +35 -22
- package/dist/react/CustomShader.js +178 -0
- package/dist/react/Preview.js +1 -0
- package/dist/react/Shader.js +1 -1
- package/dist/react/Sparkle.js +226 -0
- package/dist/react/bundle.js +178 -176
- package/dist/react/components/Sparkle.d.ts +41 -0
- package/dist/react/components/Sparkle.d.ts.map +1 -0
- package/dist/react/engine/CustomShader.d.ts +37 -0
- package/dist/react/engine/CustomShader.d.ts.map +1 -0
- package/dist/react/engine/Preview.d.ts.map +1 -1
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +4 -2
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +35 -22
- package/dist/registry.js +310 -58
- package/dist/solid/components/Sparkle.d.ts +38 -0
- package/dist/solid/components/Sparkle.d.ts.map +1 -0
- package/dist/solid/components/Sparkle.js +232 -0
- package/dist/solid/engine/CustomShader.d.ts +35 -0
- package/dist/solid/engine/CustomShader.d.ts.map +1 -0
- package/dist/solid/engine/CustomShader.js +160 -0
- package/dist/solid/engine/Preview.d.ts.map +1 -1
- package/dist/solid/engine/Preview.js +319 -317
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/solid/index.d.ts +5 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +95 -86
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +35 -22
- package/dist/svelte/components/Sparkle.svelte.d.ts +28 -0
- package/dist/svelte/engine/CustomShader.svelte.d.ts +40 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.js +1237 -877
- package/dist/svelte/source/components/Sparkle.svelte +352 -0
- package/dist/svelte/source/engine/CustomShader.svelte +216 -0
- package/dist/svelte/source/engine/Preview.svelte +5 -3
- package/dist/svelte/source/index.js +4 -0
- package/dist/svelte/utils/generatePresetCode.js +35 -22
- package/dist/vue/CustomShader.js +3 -0
- package/dist/vue/CustomShader.vue_vue_type_script_setup_true_lang.js +173 -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/Sparkle.js +3 -0
- package/dist/vue/Sparkle.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/vue/components/Sparkle.vue.d.ts +63 -0
- package/dist/vue/components/Sparkle.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +4 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +4 -2
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +35 -22
- package/package.json +27 -2
- package/dist/core/Irradiance-DtC4tqNu.js +0 -4191
- package/dist/core/LightEdge-BV9bO8YB.js +0 -2339
- package/dist/core/Repeater-DU_EhoxD.js +0 -762
- package/dist/core/Shatter-DYKKCVD8.js +0 -1479
- package/dist/core/Voxels-LEG0c9YC.js +0 -8547
- package/dist/core/agents-CdLlm-5E.js +0 -5357
- package/dist/core/agents-DZaZ4n9_.js +0 -15709
- package/dist/core/blur-CrEChFnm.js +0 -8015
- package/dist/core/blurs-D5a6ad3o.js +0 -1751
- package/dist/core/canvasRaster-DDBkrdY8.js +0 -80
- package/dist/core/color-CY5teMWa.js +0 -3619
- package/dist/core/compose-DNU_Ut36.js +0 -46
- package/dist/core/device-m0ud8-Fn.js +0 -10
- package/dist/core/feedback-yfT0pT6A.js +0 -46
- package/dist/core/fields-CXwmEUsd.js +0 -475
- package/dist/core/figures-BRYcB-p2.js +0 -48
- package/dist/core/filter-BrhpSs3Z.js +0 -23
- package/dist/core/fluids-CBhAiGAx.js +0 -226
- package/dist/core/fonts-BUXTd9qb.js +0 -59
- package/dist/core/frames-Clw8-BpA.js +0 -78
- package/dist/core/glass-DIEus1UY.js +0 -2532
- package/dist/core/gradientPaints-Cx2bT20T.js +0 -6564
- package/dist/core/gradients-C15o7_xy.js +0 -159
- package/dist/core/grids-Cv99xcJg.js +0 -151
- package/dist/core/lens-ChO_HVpe.js +0 -352
- package/dist/core/light-Bba_Pie_.js +0 -271
- package/dist/core/lightfields-D120ZvMt.js +0 -2255
- package/dist/core/lower-DtoDQ7hV.js +0 -49452
- package/dist/core/mask-6rnSCir2.js +0 -28
- package/dist/core/materials-BjsiWqS0.js +0 -2944
- package/dist/core/math-7PlusTFx.js +0 -56
- package/dist/core/media-CgWmWvGq.js +0 -832
- package/dist/core/mediaLifecycle-BTPb5i1-.js +0 -320
- package/dist/core/motionBlur-DzaHMq9p.js +0 -6766
- package/dist/core/noise-G7a5U0ar.js +0 -546
- package/dist/core/noisePaints-B_axPpuv.js +0 -3619
- package/dist/core/noiseStylize-CUrW_HiC.js +0 -65
- package/dist/core/overlay-W4DAsSzP.js +0 -4712
- package/dist/core/patterns-RTt6Fek8.js +0 -9723
- package/dist/core/pointerFields-Ch_-cbCV.js +0 -2339
- package/dist/core/porters-CQwDd2t4.js +0 -30201
- package/dist/core/reveal-dbBiS7gE.js +0 -1688
- package/dist/core/sdf3d-BMqCSSPB.js +0 -21082
- package/dist/core/shaderRegistry-Bs0XOv9A.js +0 -443
- package/dist/core/shape-B2CoDi6l.js +0 -20
- package/dist/core/shapePaints-7HrXeLYX.js +0 -3354
- package/dist/core/signal-emJuvOI3.js +0 -34
- package/dist/core/slots-BqIef2iV.js +0 -32
- package/dist/core/stylize-CiN0ZaMu.js +0 -4541
- package/dist/core/tone-CsRho9qb.js +0 -763
- package/dist/core/warpMaps-Dbuleg2M.js +0 -10773
- package/dist/core/warps-gIr3RmZV.js +0 -276
- /package/dist/core/{transformations-CzFmhZww.js → transformations-P50Uo_Ju.js} +0 -0
|
@@ -1,2944 +0,0 @@
|
|
|
1
|
-
import { An as value12, Bn as TWO_PI, Br as struct, Cn as mxNoiseFloat3, Cr as sin$1, En as perlin12d, Gn as typegpu_default, I as sdf_exports, Kr as bool, Mr as vec4f, Or as vec2f, Sn as mxNoiseFloat2, Tr as sqrt, _r as mix$1, ar as clamp$1, at as ZERO, cr as dot$1, ct as call, er as select, ft as floatE, gr as min, hr as max$1, ht as Expr, jr as vec3f, lr as exp$1, mr as length$1, or as cos, qr as f32, ti as __export, tr as abs, vn as hash12, vr as normalize$1, wn as mxWorleyNoiseFloat2Pub, wr as smoothstep$1, wt as neutral, yr as pow$1 } from "./lower-DtoDQ7hV.js";
|
|
2
|
-
import { w as sdf3d_exports } from "./sdf3d-BMqCSSPB.js";
|
|
3
|
-
import { n as glass_exports } from "./glass-DIEus1UY.js";
|
|
4
|
-
import { B as vec2, C as mix, D as pow, E as normalize, I as splat3, N as sin, P as smoothstep, T as neg, V as vec3, c as exp, i as clamp, l as exp2, n as add, o as div, s as dot, u as float, v as length, w as mul, x as max, y as local, z as sub } from "./math-7PlusTFx.js";
|
|
5
|
-
var lighting_exports = /* @__PURE__ */ __export({
|
|
6
|
-
TangentFrame: () => TangentFrame,
|
|
7
|
-
WardSpecularInput: () => WardSpecularInput,
|
|
8
|
-
bevelledFlatNormal: () => bevelledFlatNormal,
|
|
9
|
-
cosinePalette: () => cosinePalette,
|
|
10
|
-
fieldGradient: () => fieldGradient,
|
|
11
|
-
insideMask: () => insideMask,
|
|
12
|
-
orthonormalTangentFrame: () => orthonormalTangentFrame,
|
|
13
|
-
outsideShape: () => outsideShape,
|
|
14
|
-
patternCoords: () => patternCoords,
|
|
15
|
-
perspectiveViewRay: () => perspectiveViewRay,
|
|
16
|
-
volumetricNormal: () => volumetricNormal,
|
|
17
|
-
wardAnisotropicSpecular: () => wardAnisotropicSpecular
|
|
18
|
-
});
|
|
19
|
-
const fieldGradient = typegpu_default.fn([
|
|
20
|
-
vec4f,
|
|
21
|
-
vec4f,
|
|
22
|
-
vec4f,
|
|
23
|
-
f32
|
|
24
|
-
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((surf0, surfX, surfY, eps) => {
|
|
25
|
-
"use gpu";
|
|
26
|
-
return vec2f(__tsover_div(__tsover_sub(surfX.x, surf0.x), eps), __tsover_div(__tsover_sub(surfY.x, surf0.x), eps));
|
|
27
|
-
}), {
|
|
28
|
-
v: 2,
|
|
29
|
-
name: void 0,
|
|
30
|
-
ast: {
|
|
31
|
-
"params": [
|
|
32
|
-
{
|
|
33
|
-
"type": "i",
|
|
34
|
-
"name": "surf0"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "i",
|
|
38
|
-
"name": "surfX"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"type": "i",
|
|
42
|
-
"name": "surfY"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "i",
|
|
46
|
-
"name": "eps"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"body": [0, [[10, [
|
|
50
|
-
6,
|
|
51
|
-
"d.vec2f",
|
|
52
|
-
[[
|
|
53
|
-
1,
|
|
54
|
-
[
|
|
55
|
-
1,
|
|
56
|
-
[
|
|
57
|
-
7,
|
|
58
|
-
"surfX",
|
|
59
|
-
"x"
|
|
60
|
-
],
|
|
61
|
-
"-",
|
|
62
|
-
[
|
|
63
|
-
7,
|
|
64
|
-
"surf0",
|
|
65
|
-
"x"
|
|
66
|
-
]
|
|
67
|
-
],
|
|
68
|
-
"/",
|
|
69
|
-
"eps"
|
|
70
|
-
], [
|
|
71
|
-
1,
|
|
72
|
-
[
|
|
73
|
-
1,
|
|
74
|
-
[
|
|
75
|
-
7,
|
|
76
|
-
"surfY",
|
|
77
|
-
"x"
|
|
78
|
-
],
|
|
79
|
-
"-",
|
|
80
|
-
[
|
|
81
|
-
7,
|
|
82
|
-
"surf0",
|
|
83
|
-
"x"
|
|
84
|
-
]
|
|
85
|
-
],
|
|
86
|
-
"/",
|
|
87
|
-
"eps"
|
|
88
|
-
]]
|
|
89
|
-
]]]]
|
|
90
|
-
},
|
|
91
|
-
externals: { "d.vec2f": () => vec2f }
|
|
92
|
-
}) && $.f)({}));
|
|
93
|
-
const volumetricNormal = typegpu_default.fn([
|
|
94
|
-
vec4f,
|
|
95
|
-
vec4f,
|
|
96
|
-
vec4f,
|
|
97
|
-
f32,
|
|
98
|
-
f32
|
|
99
|
-
], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((surf0, surfX, surfY, eps, gradClamp) => {
|
|
100
|
-
"use gpu";
|
|
101
|
-
return normalize$1(vec3f(clamp$1(__tsover_div(__tsover_sub(surfX.w, surf0.w), eps), __tsover_mul(gradClamp, -1), gradClamp), clamp$1(__tsover_div(__tsover_sub(surfY.w, surf0.w), eps), __tsover_mul(gradClamp, -1), gradClamp), -1));
|
|
102
|
-
}), {
|
|
103
|
-
v: 2,
|
|
104
|
-
name: void 0,
|
|
105
|
-
ast: {
|
|
106
|
-
"params": [
|
|
107
|
-
{
|
|
108
|
-
"type": "i",
|
|
109
|
-
"name": "surf0"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"type": "i",
|
|
113
|
-
"name": "surfX"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"type": "i",
|
|
117
|
-
"name": "surfY"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"type": "i",
|
|
121
|
-
"name": "eps"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"type": "i",
|
|
125
|
-
"name": "gradClamp"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"body": [0, [
|
|
129
|
-
[
|
|
130
|
-
13,
|
|
131
|
-
"ddx",
|
|
132
|
-
[
|
|
133
|
-
6,
|
|
134
|
-
"std.clamp",
|
|
135
|
-
[
|
|
136
|
-
[
|
|
137
|
-
1,
|
|
138
|
-
[
|
|
139
|
-
1,
|
|
140
|
-
[
|
|
141
|
-
7,
|
|
142
|
-
"surfX",
|
|
143
|
-
"w"
|
|
144
|
-
],
|
|
145
|
-
"-",
|
|
146
|
-
[
|
|
147
|
-
7,
|
|
148
|
-
"surf0",
|
|
149
|
-
"w"
|
|
150
|
-
]
|
|
151
|
-
],
|
|
152
|
-
"/",
|
|
153
|
-
"eps"
|
|
154
|
-
],
|
|
155
|
-
[
|
|
156
|
-
1,
|
|
157
|
-
"gradClamp",
|
|
158
|
-
"*",
|
|
159
|
-
[
|
|
160
|
-
4,
|
|
161
|
-
"-",
|
|
162
|
-
[5, "1"]
|
|
163
|
-
]
|
|
164
|
-
],
|
|
165
|
-
"gradClamp"
|
|
166
|
-
]
|
|
167
|
-
]
|
|
168
|
-
],
|
|
169
|
-
[
|
|
170
|
-
13,
|
|
171
|
-
"ddy",
|
|
172
|
-
[
|
|
173
|
-
6,
|
|
174
|
-
"std.clamp",
|
|
175
|
-
[
|
|
176
|
-
[
|
|
177
|
-
1,
|
|
178
|
-
[
|
|
179
|
-
1,
|
|
180
|
-
[
|
|
181
|
-
7,
|
|
182
|
-
"surfY",
|
|
183
|
-
"w"
|
|
184
|
-
],
|
|
185
|
-
"-",
|
|
186
|
-
[
|
|
187
|
-
7,
|
|
188
|
-
"surf0",
|
|
189
|
-
"w"
|
|
190
|
-
]
|
|
191
|
-
],
|
|
192
|
-
"/",
|
|
193
|
-
"eps"
|
|
194
|
-
],
|
|
195
|
-
[
|
|
196
|
-
1,
|
|
197
|
-
"gradClamp",
|
|
198
|
-
"*",
|
|
199
|
-
[
|
|
200
|
-
4,
|
|
201
|
-
"-",
|
|
202
|
-
[5, "1"]
|
|
203
|
-
]
|
|
204
|
-
],
|
|
205
|
-
"gradClamp"
|
|
206
|
-
]
|
|
207
|
-
]
|
|
208
|
-
],
|
|
209
|
-
[10, [
|
|
210
|
-
6,
|
|
211
|
-
"std.normalize",
|
|
212
|
-
[[
|
|
213
|
-
6,
|
|
214
|
-
"d.vec3f",
|
|
215
|
-
[
|
|
216
|
-
"ddx",
|
|
217
|
-
"ddy",
|
|
218
|
-
[
|
|
219
|
-
4,
|
|
220
|
-
"-",
|
|
221
|
-
[5, "1"]
|
|
222
|
-
]
|
|
223
|
-
]
|
|
224
|
-
]]
|
|
225
|
-
]]
|
|
226
|
-
]]
|
|
227
|
-
},
|
|
228
|
-
externals: {
|
|
229
|
-
"std.clamp": () => clamp$1,
|
|
230
|
-
"std.normalize": () => normalize$1,
|
|
231
|
-
"d.vec3f": () => vec3f
|
|
232
|
-
}
|
|
233
|
-
}) && $.f)({}));
|
|
234
|
-
const bevelledFlatNormal = typegpu_default.fn([vec2f, f32], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((grad, sinTilt) => {
|
|
235
|
-
"use gpu";
|
|
236
|
-
const glen = max$1(length$1(grad), 1e-4);
|
|
237
|
-
const sB = min(sinTilt, .9995);
|
|
238
|
-
return vec3f(__tsover_mul(__tsover_div(grad.x, glen), sB), __tsover_mul(__tsover_div(grad.y, glen), sB), __tsover_mul(sqrt(__tsover_sub(1, __tsover_mul(sB, sB))), -1));
|
|
239
|
-
}), {
|
|
240
|
-
v: 2,
|
|
241
|
-
name: void 0,
|
|
242
|
-
ast: {
|
|
243
|
-
"params": [{
|
|
244
|
-
"type": "i",
|
|
245
|
-
"name": "grad"
|
|
246
|
-
}, {
|
|
247
|
-
"type": "i",
|
|
248
|
-
"name": "sinTilt"
|
|
249
|
-
}],
|
|
250
|
-
"body": [0, [
|
|
251
|
-
[
|
|
252
|
-
13,
|
|
253
|
-
"glen",
|
|
254
|
-
[
|
|
255
|
-
6,
|
|
256
|
-
"std.max",
|
|
257
|
-
[[
|
|
258
|
-
6,
|
|
259
|
-
"std.length",
|
|
260
|
-
["grad"]
|
|
261
|
-
], [5, "0.0001"]]
|
|
262
|
-
]
|
|
263
|
-
],
|
|
264
|
-
[
|
|
265
|
-
13,
|
|
266
|
-
"sB",
|
|
267
|
-
[
|
|
268
|
-
6,
|
|
269
|
-
"std.min",
|
|
270
|
-
["sinTilt", [5, "0.9995"]]
|
|
271
|
-
]
|
|
272
|
-
],
|
|
273
|
-
[10, [
|
|
274
|
-
6,
|
|
275
|
-
"d.vec3f",
|
|
276
|
-
[
|
|
277
|
-
[
|
|
278
|
-
1,
|
|
279
|
-
[
|
|
280
|
-
1,
|
|
281
|
-
[
|
|
282
|
-
7,
|
|
283
|
-
"grad",
|
|
284
|
-
"x"
|
|
285
|
-
],
|
|
286
|
-
"/",
|
|
287
|
-
"glen"
|
|
288
|
-
],
|
|
289
|
-
"*",
|
|
290
|
-
"sB"
|
|
291
|
-
],
|
|
292
|
-
[
|
|
293
|
-
1,
|
|
294
|
-
[
|
|
295
|
-
1,
|
|
296
|
-
[
|
|
297
|
-
7,
|
|
298
|
-
"grad",
|
|
299
|
-
"y"
|
|
300
|
-
],
|
|
301
|
-
"/",
|
|
302
|
-
"glen"
|
|
303
|
-
],
|
|
304
|
-
"*",
|
|
305
|
-
"sB"
|
|
306
|
-
],
|
|
307
|
-
[
|
|
308
|
-
1,
|
|
309
|
-
[
|
|
310
|
-
6,
|
|
311
|
-
"std.sqrt",
|
|
312
|
-
[[
|
|
313
|
-
1,
|
|
314
|
-
[5, "1"],
|
|
315
|
-
"-",
|
|
316
|
-
[
|
|
317
|
-
1,
|
|
318
|
-
"sB",
|
|
319
|
-
"*",
|
|
320
|
-
"sB"
|
|
321
|
-
]
|
|
322
|
-
]]
|
|
323
|
-
],
|
|
324
|
-
"*",
|
|
325
|
-
[
|
|
326
|
-
4,
|
|
327
|
-
"-",
|
|
328
|
-
[5, "1"]
|
|
329
|
-
]
|
|
330
|
-
]
|
|
331
|
-
]
|
|
332
|
-
]]
|
|
333
|
-
]]
|
|
334
|
-
},
|
|
335
|
-
externals: {
|
|
336
|
-
"std.max": () => max$1,
|
|
337
|
-
"std.length": () => length$1,
|
|
338
|
-
"std.min": () => min,
|
|
339
|
-
"d.vec3f": () => vec3f,
|
|
340
|
-
"std.sqrt": () => sqrt
|
|
341
|
-
}
|
|
342
|
-
}) && $.f)({}));
|
|
343
|
-
const patternCoords = typegpu_default.fn([
|
|
344
|
-
vec2f,
|
|
345
|
-
vec4f,
|
|
346
|
-
f32
|
|
347
|
-
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((sdfUV, surf0, volumetric) => {
|
|
348
|
-
"use gpu";
|
|
349
|
-
return vec2f(select(__tsover_sub(sdfUV.x, .5), surf0.y, volumetric > .5), select(__tsover_sub(sdfUV.y, .5), surf0.z, volumetric > .5));
|
|
350
|
-
}), {
|
|
351
|
-
v: 2,
|
|
352
|
-
name: void 0,
|
|
353
|
-
ast: {
|
|
354
|
-
"params": [
|
|
355
|
-
{
|
|
356
|
-
"type": "i",
|
|
357
|
-
"name": "sdfUV"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
"type": "i",
|
|
361
|
-
"name": "surf0"
|
|
362
|
-
},
|
|
363
|
-
{
|
|
364
|
-
"type": "i",
|
|
365
|
-
"name": "volumetric"
|
|
366
|
-
}
|
|
367
|
-
],
|
|
368
|
-
"body": [0, [[10, [
|
|
369
|
-
6,
|
|
370
|
-
"d.vec2f",
|
|
371
|
-
[[
|
|
372
|
-
6,
|
|
373
|
-
"std.select",
|
|
374
|
-
[
|
|
375
|
-
[
|
|
376
|
-
1,
|
|
377
|
-
[
|
|
378
|
-
7,
|
|
379
|
-
"sdfUV",
|
|
380
|
-
"x"
|
|
381
|
-
],
|
|
382
|
-
"-",
|
|
383
|
-
[5, "0.5"]
|
|
384
|
-
],
|
|
385
|
-
[
|
|
386
|
-
7,
|
|
387
|
-
"surf0",
|
|
388
|
-
"y"
|
|
389
|
-
],
|
|
390
|
-
[
|
|
391
|
-
1,
|
|
392
|
-
"volumetric",
|
|
393
|
-
">",
|
|
394
|
-
[5, "0.5"]
|
|
395
|
-
]
|
|
396
|
-
]
|
|
397
|
-
], [
|
|
398
|
-
6,
|
|
399
|
-
"std.select",
|
|
400
|
-
[
|
|
401
|
-
[
|
|
402
|
-
1,
|
|
403
|
-
[
|
|
404
|
-
7,
|
|
405
|
-
"sdfUV",
|
|
406
|
-
"y"
|
|
407
|
-
],
|
|
408
|
-
"-",
|
|
409
|
-
[5, "0.5"]
|
|
410
|
-
],
|
|
411
|
-
[
|
|
412
|
-
7,
|
|
413
|
-
"surf0",
|
|
414
|
-
"z"
|
|
415
|
-
],
|
|
416
|
-
[
|
|
417
|
-
1,
|
|
418
|
-
"volumetric",
|
|
419
|
-
">",
|
|
420
|
-
[5, "0.5"]
|
|
421
|
-
]
|
|
422
|
-
]
|
|
423
|
-
]]
|
|
424
|
-
]]]]
|
|
425
|
-
},
|
|
426
|
-
externals: {
|
|
427
|
-
"d.vec2f": () => vec2f,
|
|
428
|
-
"std.select": () => select
|
|
429
|
-
}
|
|
430
|
-
}) && $.f)({}));
|
|
431
|
-
const outsideShape = typegpu_default.fn([f32, f32], bool)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((sdf, pxH) => {
|
|
432
|
-
"use gpu";
|
|
433
|
-
return sdf > __tsover_mul(pxH, 2);
|
|
434
|
-
}), {
|
|
435
|
-
v: 2,
|
|
436
|
-
name: void 0,
|
|
437
|
-
ast: {
|
|
438
|
-
"params": [{
|
|
439
|
-
"type": "i",
|
|
440
|
-
"name": "sdf"
|
|
441
|
-
}, {
|
|
442
|
-
"type": "i",
|
|
443
|
-
"name": "pxH"
|
|
444
|
-
}],
|
|
445
|
-
"body": [0, [[10, [
|
|
446
|
-
1,
|
|
447
|
-
"sdf",
|
|
448
|
-
">",
|
|
449
|
-
[
|
|
450
|
-
1,
|
|
451
|
-
"pxH",
|
|
452
|
-
"*",
|
|
453
|
-
[5, "2"]
|
|
454
|
-
]
|
|
455
|
-
]]]]
|
|
456
|
-
},
|
|
457
|
-
externals: {}
|
|
458
|
-
}) && $.f)({}));
|
|
459
|
-
const insideMask = typegpu_default.fn([
|
|
460
|
-
f32,
|
|
461
|
-
f32,
|
|
462
|
-
f32,
|
|
463
|
-
f32
|
|
464
|
-
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((sdf, sharpEdge, pxH, minPixels) => {
|
|
465
|
-
"use gpu";
|
|
466
|
-
const w = max$1(__tsover_mul(sharpEdge, .03125), __tsover_mul(pxH, minPixels));
|
|
467
|
-
return clamp$1(__tsover_div(__tsover_mul(sdf, -1), w), 0, 1);
|
|
468
|
-
}), {
|
|
469
|
-
v: 2,
|
|
470
|
-
name: void 0,
|
|
471
|
-
ast: {
|
|
472
|
-
"params": [
|
|
473
|
-
{
|
|
474
|
-
"type": "i",
|
|
475
|
-
"name": "sdf"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"type": "i",
|
|
479
|
-
"name": "sharpEdge"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"type": "i",
|
|
483
|
-
"name": "pxH"
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
"type": "i",
|
|
487
|
-
"name": "minPixels"
|
|
488
|
-
}
|
|
489
|
-
],
|
|
490
|
-
"body": [0, [[
|
|
491
|
-
13,
|
|
492
|
-
"w",
|
|
493
|
-
[
|
|
494
|
-
6,
|
|
495
|
-
"std.max",
|
|
496
|
-
[[
|
|
497
|
-
1,
|
|
498
|
-
"sharpEdge",
|
|
499
|
-
"*",
|
|
500
|
-
[5, "0.03125"]
|
|
501
|
-
], [
|
|
502
|
-
1,
|
|
503
|
-
"pxH",
|
|
504
|
-
"*",
|
|
505
|
-
"minPixels"
|
|
506
|
-
]]
|
|
507
|
-
]
|
|
508
|
-
], [10, [
|
|
509
|
-
6,
|
|
510
|
-
"std.clamp",
|
|
511
|
-
[
|
|
512
|
-
[
|
|
513
|
-
1,
|
|
514
|
-
[
|
|
515
|
-
1,
|
|
516
|
-
"sdf",
|
|
517
|
-
"*",
|
|
518
|
-
[
|
|
519
|
-
4,
|
|
520
|
-
"-",
|
|
521
|
-
[5, "1"]
|
|
522
|
-
]
|
|
523
|
-
],
|
|
524
|
-
"/",
|
|
525
|
-
"w"
|
|
526
|
-
],
|
|
527
|
-
[5, "0"],
|
|
528
|
-
[5, "1"]
|
|
529
|
-
]
|
|
530
|
-
]]]]
|
|
531
|
-
},
|
|
532
|
-
externals: {
|
|
533
|
-
"std.max": () => max$1,
|
|
534
|
-
"std.clamp": () => clamp$1
|
|
535
|
-
}
|
|
536
|
-
}) && $.f)({}));
|
|
537
|
-
const perspectiveViewRay = typegpu_default.fn([
|
|
538
|
-
vec2f,
|
|
539
|
-
f32,
|
|
540
|
-
f32
|
|
541
|
-
], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, aspect, fov) => {
|
|
542
|
-
"use gpu";
|
|
543
|
-
return normalize$1(vec3f(__tsover_mul(__tsover_mul(__tsover_sub(uv.x, .5), aspect), fov), __tsover_mul(__tsover_sub(uv.y, .5), fov), 1));
|
|
544
|
-
}), {
|
|
545
|
-
v: 2,
|
|
546
|
-
name: void 0,
|
|
547
|
-
ast: {
|
|
548
|
-
"params": [
|
|
549
|
-
{
|
|
550
|
-
"type": "i",
|
|
551
|
-
"name": "uv"
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
"type": "i",
|
|
555
|
-
"name": "aspect"
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"type": "i",
|
|
559
|
-
"name": "fov"
|
|
560
|
-
}
|
|
561
|
-
],
|
|
562
|
-
"body": [0, [[10, [
|
|
563
|
-
6,
|
|
564
|
-
"std.normalize",
|
|
565
|
-
[[
|
|
566
|
-
6,
|
|
567
|
-
"d.vec3f",
|
|
568
|
-
[
|
|
569
|
-
[
|
|
570
|
-
1,
|
|
571
|
-
[
|
|
572
|
-
1,
|
|
573
|
-
[
|
|
574
|
-
1,
|
|
575
|
-
[
|
|
576
|
-
7,
|
|
577
|
-
"uv",
|
|
578
|
-
"x"
|
|
579
|
-
],
|
|
580
|
-
"-",
|
|
581
|
-
[5, "0.5"]
|
|
582
|
-
],
|
|
583
|
-
"*",
|
|
584
|
-
"aspect"
|
|
585
|
-
],
|
|
586
|
-
"*",
|
|
587
|
-
"fov"
|
|
588
|
-
],
|
|
589
|
-
[
|
|
590
|
-
1,
|
|
591
|
-
[
|
|
592
|
-
1,
|
|
593
|
-
[
|
|
594
|
-
7,
|
|
595
|
-
"uv",
|
|
596
|
-
"y"
|
|
597
|
-
],
|
|
598
|
-
"-",
|
|
599
|
-
[5, "0.5"]
|
|
600
|
-
],
|
|
601
|
-
"*",
|
|
602
|
-
"fov"
|
|
603
|
-
],
|
|
604
|
-
[5, "1"]
|
|
605
|
-
]
|
|
606
|
-
]]
|
|
607
|
-
]]]]
|
|
608
|
-
},
|
|
609
|
-
externals: {
|
|
610
|
-
"std.normalize": () => normalize$1,
|
|
611
|
-
"d.vec3f": () => vec3f
|
|
612
|
-
}
|
|
613
|
-
}) && $.f)({}));
|
|
614
|
-
const TangentFrame = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
615
|
-
tangent: vec3f,
|
|
616
|
-
bitangent: vec3f
|
|
617
|
-
}), "TangentFrame");
|
|
618
|
-
const orthonormalTangentFrame = typegpu_default.fn([vec3f, vec3f], TangentFrame)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((normal, dir) => {
|
|
619
|
-
"use gpu";
|
|
620
|
-
const T3 = normalize$1(dir.sub(normal.mul(dot$1(normal, dir))));
|
|
621
|
-
return TangentFrame({
|
|
622
|
-
tangent: T3,
|
|
623
|
-
bitangent: vec3f(__tsover_sub(__tsover_mul(normal.y, T3.z), __tsover_mul(normal.z, T3.y)), __tsover_sub(__tsover_mul(normal.z, T3.x), __tsover_mul(normal.x, T3.z)), __tsover_sub(__tsover_mul(normal.x, T3.y), __tsover_mul(normal.y, T3.x)))
|
|
624
|
-
});
|
|
625
|
-
}), {
|
|
626
|
-
v: 2,
|
|
627
|
-
name: void 0,
|
|
628
|
-
ast: {
|
|
629
|
-
"params": [{
|
|
630
|
-
"type": "i",
|
|
631
|
-
"name": "normal"
|
|
632
|
-
}, {
|
|
633
|
-
"type": "i",
|
|
634
|
-
"name": "dir"
|
|
635
|
-
}],
|
|
636
|
-
"body": [0, [
|
|
637
|
-
[
|
|
638
|
-
13,
|
|
639
|
-
"T3",
|
|
640
|
-
[
|
|
641
|
-
6,
|
|
642
|
-
"std.normalize",
|
|
643
|
-
[[
|
|
644
|
-
6,
|
|
645
|
-
[
|
|
646
|
-
7,
|
|
647
|
-
"dir",
|
|
648
|
-
"sub"
|
|
649
|
-
],
|
|
650
|
-
[[
|
|
651
|
-
6,
|
|
652
|
-
[
|
|
653
|
-
7,
|
|
654
|
-
"normal",
|
|
655
|
-
"mul"
|
|
656
|
-
],
|
|
657
|
-
[[
|
|
658
|
-
6,
|
|
659
|
-
"std.dot",
|
|
660
|
-
["normal", "dir"]
|
|
661
|
-
]]
|
|
662
|
-
]]
|
|
663
|
-
]]
|
|
664
|
-
]
|
|
665
|
-
],
|
|
666
|
-
[
|
|
667
|
-
13,
|
|
668
|
-
"B3",
|
|
669
|
-
[
|
|
670
|
-
6,
|
|
671
|
-
"d.vec3f",
|
|
672
|
-
[
|
|
673
|
-
[
|
|
674
|
-
1,
|
|
675
|
-
[
|
|
676
|
-
1,
|
|
677
|
-
[
|
|
678
|
-
7,
|
|
679
|
-
"normal",
|
|
680
|
-
"y"
|
|
681
|
-
],
|
|
682
|
-
"*",
|
|
683
|
-
[
|
|
684
|
-
7,
|
|
685
|
-
"T3",
|
|
686
|
-
"z"
|
|
687
|
-
]
|
|
688
|
-
],
|
|
689
|
-
"-",
|
|
690
|
-
[
|
|
691
|
-
1,
|
|
692
|
-
[
|
|
693
|
-
7,
|
|
694
|
-
"normal",
|
|
695
|
-
"z"
|
|
696
|
-
],
|
|
697
|
-
"*",
|
|
698
|
-
[
|
|
699
|
-
7,
|
|
700
|
-
"T3",
|
|
701
|
-
"y"
|
|
702
|
-
]
|
|
703
|
-
]
|
|
704
|
-
],
|
|
705
|
-
[
|
|
706
|
-
1,
|
|
707
|
-
[
|
|
708
|
-
1,
|
|
709
|
-
[
|
|
710
|
-
7,
|
|
711
|
-
"normal",
|
|
712
|
-
"z"
|
|
713
|
-
],
|
|
714
|
-
"*",
|
|
715
|
-
[
|
|
716
|
-
7,
|
|
717
|
-
"T3",
|
|
718
|
-
"x"
|
|
719
|
-
]
|
|
720
|
-
],
|
|
721
|
-
"-",
|
|
722
|
-
[
|
|
723
|
-
1,
|
|
724
|
-
[
|
|
725
|
-
7,
|
|
726
|
-
"normal",
|
|
727
|
-
"x"
|
|
728
|
-
],
|
|
729
|
-
"*",
|
|
730
|
-
[
|
|
731
|
-
7,
|
|
732
|
-
"T3",
|
|
733
|
-
"z"
|
|
734
|
-
]
|
|
735
|
-
]
|
|
736
|
-
],
|
|
737
|
-
[
|
|
738
|
-
1,
|
|
739
|
-
[
|
|
740
|
-
1,
|
|
741
|
-
[
|
|
742
|
-
7,
|
|
743
|
-
"normal",
|
|
744
|
-
"x"
|
|
745
|
-
],
|
|
746
|
-
"*",
|
|
747
|
-
[
|
|
748
|
-
7,
|
|
749
|
-
"T3",
|
|
750
|
-
"y"
|
|
751
|
-
]
|
|
752
|
-
],
|
|
753
|
-
"-",
|
|
754
|
-
[
|
|
755
|
-
1,
|
|
756
|
-
[
|
|
757
|
-
7,
|
|
758
|
-
"normal",
|
|
759
|
-
"y"
|
|
760
|
-
],
|
|
761
|
-
"*",
|
|
762
|
-
[
|
|
763
|
-
7,
|
|
764
|
-
"T3",
|
|
765
|
-
"x"
|
|
766
|
-
]
|
|
767
|
-
]
|
|
768
|
-
]
|
|
769
|
-
]
|
|
770
|
-
]
|
|
771
|
-
],
|
|
772
|
-
[10, [
|
|
773
|
-
6,
|
|
774
|
-
"TangentFrame",
|
|
775
|
-
[[104, {
|
|
776
|
-
"tangent": "T3",
|
|
777
|
-
"bitangent": "B3"
|
|
778
|
-
}]]
|
|
779
|
-
]]
|
|
780
|
-
]]
|
|
781
|
-
},
|
|
782
|
-
externals: {
|
|
783
|
-
"std.normalize": () => normalize$1,
|
|
784
|
-
"std.dot": () => dot$1,
|
|
785
|
-
"d.vec3f": () => vec3f,
|
|
786
|
-
"TangentFrame": () => TangentFrame
|
|
787
|
-
}
|
|
788
|
-
}) && $.f)({}));
|
|
789
|
-
const WardSpecularInput = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
790
|
-
normal: vec3f,
|
|
791
|
-
tangent: vec3f,
|
|
792
|
-
light: vec3f,
|
|
793
|
-
view: vec3f,
|
|
794
|
-
alphaAlong: f32,
|
|
795
|
-
alphaAcross: f32
|
|
796
|
-
}), "WardSpecularInput");
|
|
797
|
-
const wardAnisotropicSpecular = typegpu_default.fn([WardSpecularInput], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p) => {
|
|
798
|
-
"use gpu";
|
|
799
|
-
const frame = orthonormalTangentFrame(p.normal, p.tangent);
|
|
800
|
-
const H = normalize$1(p.light.sub(p.view));
|
|
801
|
-
const hT = dot$1(H, frame.tangent);
|
|
802
|
-
const hB = dot$1(H, frame.bitangent);
|
|
803
|
-
const hN = clamp$1(abs(dot$1(H, p.normal)), 1e-4, 1);
|
|
804
|
-
const aT = max$1(p.alphaAlong, 1e-4);
|
|
805
|
-
const aB = max$1(p.alphaAcross, 1e-4);
|
|
806
|
-
const expo = __tsover_div(__tsover_add(__tsover_mul(__tsover_div(hT, aT), __tsover_div(hT, aT)), __tsover_mul(__tsover_div(hB, aB), __tsover_div(hB, aB))), __tsover_mul(__tsover_add(hN, 1), .5));
|
|
807
|
-
return exp$1(__tsover_mul(expo, -1));
|
|
808
|
-
}), {
|
|
809
|
-
v: 2,
|
|
810
|
-
name: void 0,
|
|
811
|
-
ast: {
|
|
812
|
-
"params": [{
|
|
813
|
-
"type": "i",
|
|
814
|
-
"name": "p"
|
|
815
|
-
}],
|
|
816
|
-
"body": [0, [
|
|
817
|
-
[
|
|
818
|
-
13,
|
|
819
|
-
"frame",
|
|
820
|
-
[
|
|
821
|
-
6,
|
|
822
|
-
"orthonormalTangentFrame",
|
|
823
|
-
[[
|
|
824
|
-
7,
|
|
825
|
-
"p",
|
|
826
|
-
"normal"
|
|
827
|
-
], [
|
|
828
|
-
7,
|
|
829
|
-
"p",
|
|
830
|
-
"tangent"
|
|
831
|
-
]]
|
|
832
|
-
]
|
|
833
|
-
],
|
|
834
|
-
[
|
|
835
|
-
13,
|
|
836
|
-
"H",
|
|
837
|
-
[
|
|
838
|
-
6,
|
|
839
|
-
"std.normalize",
|
|
840
|
-
[[
|
|
841
|
-
6,
|
|
842
|
-
[
|
|
843
|
-
7,
|
|
844
|
-
[
|
|
845
|
-
7,
|
|
846
|
-
"p",
|
|
847
|
-
"light"
|
|
848
|
-
],
|
|
849
|
-
"sub"
|
|
850
|
-
],
|
|
851
|
-
[[
|
|
852
|
-
7,
|
|
853
|
-
"p",
|
|
854
|
-
"view"
|
|
855
|
-
]]
|
|
856
|
-
]]
|
|
857
|
-
]
|
|
858
|
-
],
|
|
859
|
-
[
|
|
860
|
-
13,
|
|
861
|
-
"hT",
|
|
862
|
-
[
|
|
863
|
-
6,
|
|
864
|
-
"std.dot",
|
|
865
|
-
["H", [
|
|
866
|
-
7,
|
|
867
|
-
"frame",
|
|
868
|
-
"tangent"
|
|
869
|
-
]]
|
|
870
|
-
]
|
|
871
|
-
],
|
|
872
|
-
[
|
|
873
|
-
13,
|
|
874
|
-
"hB",
|
|
875
|
-
[
|
|
876
|
-
6,
|
|
877
|
-
"std.dot",
|
|
878
|
-
["H", [
|
|
879
|
-
7,
|
|
880
|
-
"frame",
|
|
881
|
-
"bitangent"
|
|
882
|
-
]]
|
|
883
|
-
]
|
|
884
|
-
],
|
|
885
|
-
[
|
|
886
|
-
13,
|
|
887
|
-
"hN",
|
|
888
|
-
[
|
|
889
|
-
6,
|
|
890
|
-
"std.clamp",
|
|
891
|
-
[
|
|
892
|
-
[
|
|
893
|
-
6,
|
|
894
|
-
"std.abs",
|
|
895
|
-
[[
|
|
896
|
-
6,
|
|
897
|
-
"std.dot",
|
|
898
|
-
["H", [
|
|
899
|
-
7,
|
|
900
|
-
"p",
|
|
901
|
-
"normal"
|
|
902
|
-
]]
|
|
903
|
-
]]
|
|
904
|
-
],
|
|
905
|
-
[5, "0.0001"],
|
|
906
|
-
[5, "1"]
|
|
907
|
-
]
|
|
908
|
-
]
|
|
909
|
-
],
|
|
910
|
-
[
|
|
911
|
-
13,
|
|
912
|
-
"aT",
|
|
913
|
-
[
|
|
914
|
-
6,
|
|
915
|
-
"std.max",
|
|
916
|
-
[[
|
|
917
|
-
7,
|
|
918
|
-
"p",
|
|
919
|
-
"alphaAlong"
|
|
920
|
-
], [5, "0.0001"]]
|
|
921
|
-
]
|
|
922
|
-
],
|
|
923
|
-
[
|
|
924
|
-
13,
|
|
925
|
-
"aB",
|
|
926
|
-
[
|
|
927
|
-
6,
|
|
928
|
-
"std.max",
|
|
929
|
-
[[
|
|
930
|
-
7,
|
|
931
|
-
"p",
|
|
932
|
-
"alphaAcross"
|
|
933
|
-
], [5, "0.0001"]]
|
|
934
|
-
]
|
|
935
|
-
],
|
|
936
|
-
[
|
|
937
|
-
13,
|
|
938
|
-
"expo",
|
|
939
|
-
[
|
|
940
|
-
1,
|
|
941
|
-
[
|
|
942
|
-
1,
|
|
943
|
-
[
|
|
944
|
-
1,
|
|
945
|
-
[
|
|
946
|
-
1,
|
|
947
|
-
"hT",
|
|
948
|
-
"/",
|
|
949
|
-
"aT"
|
|
950
|
-
],
|
|
951
|
-
"*",
|
|
952
|
-
[
|
|
953
|
-
1,
|
|
954
|
-
"hT",
|
|
955
|
-
"/",
|
|
956
|
-
"aT"
|
|
957
|
-
]
|
|
958
|
-
],
|
|
959
|
-
"+",
|
|
960
|
-
[
|
|
961
|
-
1,
|
|
962
|
-
[
|
|
963
|
-
1,
|
|
964
|
-
"hB",
|
|
965
|
-
"/",
|
|
966
|
-
"aB"
|
|
967
|
-
],
|
|
968
|
-
"*",
|
|
969
|
-
[
|
|
970
|
-
1,
|
|
971
|
-
"hB",
|
|
972
|
-
"/",
|
|
973
|
-
"aB"
|
|
974
|
-
]
|
|
975
|
-
]
|
|
976
|
-
],
|
|
977
|
-
"/",
|
|
978
|
-
[
|
|
979
|
-
1,
|
|
980
|
-
[
|
|
981
|
-
1,
|
|
982
|
-
"hN",
|
|
983
|
-
"+",
|
|
984
|
-
[5, "1"]
|
|
985
|
-
],
|
|
986
|
-
"*",
|
|
987
|
-
[5, "0.5"]
|
|
988
|
-
]
|
|
989
|
-
]
|
|
990
|
-
],
|
|
991
|
-
[10, [
|
|
992
|
-
6,
|
|
993
|
-
"std.exp",
|
|
994
|
-
[[
|
|
995
|
-
1,
|
|
996
|
-
"expo",
|
|
997
|
-
"*",
|
|
998
|
-
[
|
|
999
|
-
4,
|
|
1000
|
-
"-",
|
|
1001
|
-
[5, "1"]
|
|
1002
|
-
]
|
|
1003
|
-
]]
|
|
1004
|
-
]]
|
|
1005
|
-
]]
|
|
1006
|
-
},
|
|
1007
|
-
externals: {
|
|
1008
|
-
"orthonormalTangentFrame": () => orthonormalTangentFrame,
|
|
1009
|
-
"std.normalize": () => normalize$1,
|
|
1010
|
-
"std.dot": () => dot$1,
|
|
1011
|
-
"std.clamp": () => clamp$1,
|
|
1012
|
-
"std.abs": () => abs,
|
|
1013
|
-
"std.max": () => max$1,
|
|
1014
|
-
"std.exp": () => exp$1
|
|
1015
|
-
}
|
|
1016
|
-
}) && $.f)({}));
|
|
1017
|
-
const cosinePalette = typegpu_default.fn([
|
|
1018
|
-
f32,
|
|
1019
|
-
f32,
|
|
1020
|
-
f32,
|
|
1021
|
-
f32
|
|
1022
|
-
], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((t, phaseR, phaseG, phaseB) => {
|
|
1023
|
-
"use gpu";
|
|
1024
|
-
return vec3f(__tsover_add(__tsover_mul(cos(__tsover_mul(__tsover_add(t, phaseR), TWO_PI)), .5), .5), __tsover_add(__tsover_mul(cos(__tsover_mul(__tsover_add(t, phaseG), TWO_PI)), .5), .5), __tsover_add(__tsover_mul(cos(__tsover_mul(__tsover_add(t, phaseB), TWO_PI)), .5), .5));
|
|
1025
|
-
}), {
|
|
1026
|
-
v: 2,
|
|
1027
|
-
name: void 0,
|
|
1028
|
-
ast: {
|
|
1029
|
-
"params": [
|
|
1030
|
-
{
|
|
1031
|
-
"type": "i",
|
|
1032
|
-
"name": "t"
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
"type": "i",
|
|
1036
|
-
"name": "phaseR"
|
|
1037
|
-
},
|
|
1038
|
-
{
|
|
1039
|
-
"type": "i",
|
|
1040
|
-
"name": "phaseG"
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
"type": "i",
|
|
1044
|
-
"name": "phaseB"
|
|
1045
|
-
}
|
|
1046
|
-
],
|
|
1047
|
-
"body": [0, [[10, [
|
|
1048
|
-
6,
|
|
1049
|
-
"d.vec3f",
|
|
1050
|
-
[
|
|
1051
|
-
[
|
|
1052
|
-
1,
|
|
1053
|
-
[
|
|
1054
|
-
1,
|
|
1055
|
-
[
|
|
1056
|
-
6,
|
|
1057
|
-
"std.cos",
|
|
1058
|
-
[[
|
|
1059
|
-
1,
|
|
1060
|
-
[
|
|
1061
|
-
1,
|
|
1062
|
-
"t",
|
|
1063
|
-
"+",
|
|
1064
|
-
"phaseR"
|
|
1065
|
-
],
|
|
1066
|
-
"*",
|
|
1067
|
-
"TWO_PI"
|
|
1068
|
-
]]
|
|
1069
|
-
],
|
|
1070
|
-
"*",
|
|
1071
|
-
[5, "0.5"]
|
|
1072
|
-
],
|
|
1073
|
-
"+",
|
|
1074
|
-
[5, "0.5"]
|
|
1075
|
-
],
|
|
1076
|
-
[
|
|
1077
|
-
1,
|
|
1078
|
-
[
|
|
1079
|
-
1,
|
|
1080
|
-
[
|
|
1081
|
-
6,
|
|
1082
|
-
"std.cos",
|
|
1083
|
-
[[
|
|
1084
|
-
1,
|
|
1085
|
-
[
|
|
1086
|
-
1,
|
|
1087
|
-
"t",
|
|
1088
|
-
"+",
|
|
1089
|
-
"phaseG"
|
|
1090
|
-
],
|
|
1091
|
-
"*",
|
|
1092
|
-
"TWO_PI"
|
|
1093
|
-
]]
|
|
1094
|
-
],
|
|
1095
|
-
"*",
|
|
1096
|
-
[5, "0.5"]
|
|
1097
|
-
],
|
|
1098
|
-
"+",
|
|
1099
|
-
[5, "0.5"]
|
|
1100
|
-
],
|
|
1101
|
-
[
|
|
1102
|
-
1,
|
|
1103
|
-
[
|
|
1104
|
-
1,
|
|
1105
|
-
[
|
|
1106
|
-
6,
|
|
1107
|
-
"std.cos",
|
|
1108
|
-
[[
|
|
1109
|
-
1,
|
|
1110
|
-
[
|
|
1111
|
-
1,
|
|
1112
|
-
"t",
|
|
1113
|
-
"+",
|
|
1114
|
-
"phaseB"
|
|
1115
|
-
],
|
|
1116
|
-
"*",
|
|
1117
|
-
"TWO_PI"
|
|
1118
|
-
]]
|
|
1119
|
-
],
|
|
1120
|
-
"*",
|
|
1121
|
-
[5, "0.5"]
|
|
1122
|
-
],
|
|
1123
|
-
"+",
|
|
1124
|
-
[5, "0.5"]
|
|
1125
|
-
]
|
|
1126
|
-
]
|
|
1127
|
-
]]]]
|
|
1128
|
-
},
|
|
1129
|
-
externals: {
|
|
1130
|
-
"d.vec3f": () => vec3f,
|
|
1131
|
-
"std.cos": () => cos,
|
|
1132
|
-
"TWO_PI": () => TWO_PI
|
|
1133
|
-
}
|
|
1134
|
-
}) && $.f)({}));
|
|
1135
|
-
const silhouetteAlpha = typegpu_default.fn([
|
|
1136
|
-
f32,
|
|
1137
|
-
f32,
|
|
1138
|
-
f32
|
|
1139
|
-
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((sdf, edgeSoftness, pxH) => {
|
|
1140
|
-
"use gpu";
|
|
1141
|
-
return smoothstep$1(0, 1, insideMask(sdf, max$1(__tsover_mul(edgeSoftness, .5), .001), pxH, 1.5));
|
|
1142
|
-
}), {
|
|
1143
|
-
v: 2,
|
|
1144
|
-
name: void 0,
|
|
1145
|
-
ast: {
|
|
1146
|
-
"params": [
|
|
1147
|
-
{
|
|
1148
|
-
"type": "i",
|
|
1149
|
-
"name": "sdf"
|
|
1150
|
-
},
|
|
1151
|
-
{
|
|
1152
|
-
"type": "i",
|
|
1153
|
-
"name": "edgeSoftness"
|
|
1154
|
-
},
|
|
1155
|
-
{
|
|
1156
|
-
"type": "i",
|
|
1157
|
-
"name": "pxH"
|
|
1158
|
-
}
|
|
1159
|
-
],
|
|
1160
|
-
"body": [0, [[
|
|
1161
|
-
13,
|
|
1162
|
-
"sharpEdge",
|
|
1163
|
-
[
|
|
1164
|
-
6,
|
|
1165
|
-
"std.max",
|
|
1166
|
-
[[
|
|
1167
|
-
1,
|
|
1168
|
-
"edgeSoftness",
|
|
1169
|
-
"*",
|
|
1170
|
-
[5, "0.5"]
|
|
1171
|
-
], [5, "0.001"]]
|
|
1172
|
-
]
|
|
1173
|
-
], [10, [
|
|
1174
|
-
6,
|
|
1175
|
-
"std.smoothstep",
|
|
1176
|
-
[
|
|
1177
|
-
[5, "0"],
|
|
1178
|
-
[5, "1"],
|
|
1179
|
-
[
|
|
1180
|
-
6,
|
|
1181
|
-
"insideMask",
|
|
1182
|
-
[
|
|
1183
|
-
"sdf",
|
|
1184
|
-
"sharpEdge",
|
|
1185
|
-
"pxH",
|
|
1186
|
-
[5, "1.5"]
|
|
1187
|
-
]
|
|
1188
|
-
]
|
|
1189
|
-
]
|
|
1190
|
-
]]]]
|
|
1191
|
-
},
|
|
1192
|
-
externals: {
|
|
1193
|
-
"std.max": () => max$1,
|
|
1194
|
-
"std.smoothstep": () => smoothstep$1,
|
|
1195
|
-
"insideMask": () => insideMask
|
|
1196
|
-
}
|
|
1197
|
-
}) && $.f)({}));
|
|
1198
|
-
const KeyLight = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
1199
|
-
L: vec3f,
|
|
1200
|
-
H: vec3f
|
|
1201
|
-
}), "KeyLight");
|
|
1202
|
-
const keyLight = typegpu_default.fn([
|
|
1203
|
-
f32,
|
|
1204
|
-
f32,
|
|
1205
|
-
f32
|
|
1206
|
-
], KeyLight)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((lx, ly, lz) => {
|
|
1207
|
-
"use gpu";
|
|
1208
|
-
const L = normalize$1(vec3f(lx, ly, lz));
|
|
1209
|
-
return KeyLight({
|
|
1210
|
-
L,
|
|
1211
|
-
H: normalize$1(L.add(vec3f(0, 0, -1)))
|
|
1212
|
-
});
|
|
1213
|
-
}), {
|
|
1214
|
-
v: 2,
|
|
1215
|
-
name: void 0,
|
|
1216
|
-
ast: {
|
|
1217
|
-
"params": [
|
|
1218
|
-
{
|
|
1219
|
-
"type": "i",
|
|
1220
|
-
"name": "lx"
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
"type": "i",
|
|
1224
|
-
"name": "ly"
|
|
1225
|
-
},
|
|
1226
|
-
{
|
|
1227
|
-
"type": "i",
|
|
1228
|
-
"name": "lz"
|
|
1229
|
-
}
|
|
1230
|
-
],
|
|
1231
|
-
"body": [0, [
|
|
1232
|
-
[
|
|
1233
|
-
13,
|
|
1234
|
-
"L",
|
|
1235
|
-
[
|
|
1236
|
-
6,
|
|
1237
|
-
"std.normalize",
|
|
1238
|
-
[[
|
|
1239
|
-
6,
|
|
1240
|
-
"d.vec3f",
|
|
1241
|
-
[
|
|
1242
|
-
"lx",
|
|
1243
|
-
"ly",
|
|
1244
|
-
"lz"
|
|
1245
|
-
]
|
|
1246
|
-
]]
|
|
1247
|
-
]
|
|
1248
|
-
],
|
|
1249
|
-
[
|
|
1250
|
-
13,
|
|
1251
|
-
"H",
|
|
1252
|
-
[
|
|
1253
|
-
6,
|
|
1254
|
-
"std.normalize",
|
|
1255
|
-
[[
|
|
1256
|
-
6,
|
|
1257
|
-
[
|
|
1258
|
-
7,
|
|
1259
|
-
"L",
|
|
1260
|
-
"add"
|
|
1261
|
-
],
|
|
1262
|
-
[[
|
|
1263
|
-
6,
|
|
1264
|
-
"d.vec3f",
|
|
1265
|
-
[
|
|
1266
|
-
[5, "0"],
|
|
1267
|
-
[5, "0"],
|
|
1268
|
-
[
|
|
1269
|
-
4,
|
|
1270
|
-
"-",
|
|
1271
|
-
[5, "1"]
|
|
1272
|
-
]
|
|
1273
|
-
]
|
|
1274
|
-
]]
|
|
1275
|
-
]]
|
|
1276
|
-
]
|
|
1277
|
-
],
|
|
1278
|
-
[10, [
|
|
1279
|
-
6,
|
|
1280
|
-
"KeyLight",
|
|
1281
|
-
[[104, {
|
|
1282
|
-
"L": "L",
|
|
1283
|
-
"H": "H"
|
|
1284
|
-
}]]
|
|
1285
|
-
]]
|
|
1286
|
-
]]
|
|
1287
|
-
},
|
|
1288
|
-
externals: {
|
|
1289
|
-
"std.normalize": () => normalize$1,
|
|
1290
|
-
"d.vec3f": () => vec3f,
|
|
1291
|
-
"KeyLight": () => KeyLight
|
|
1292
|
-
}
|
|
1293
|
-
}) && $.f)({}));
|
|
1294
|
-
const grazingView = typegpu_default.fn([vec3f], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((n) => {
|
|
1295
|
-
"use gpu";
|
|
1296
|
-
return __tsover_sub(1, clamp$1(__tsover_mul(n.z, -1), 0, 1));
|
|
1297
|
-
}), {
|
|
1298
|
-
v: 2,
|
|
1299
|
-
name: void 0,
|
|
1300
|
-
ast: {
|
|
1301
|
-
"params": [{
|
|
1302
|
-
"type": "i",
|
|
1303
|
-
"name": "n"
|
|
1304
|
-
}],
|
|
1305
|
-
"body": [0, [[10, [
|
|
1306
|
-
1,
|
|
1307
|
-
[5, "1"],
|
|
1308
|
-
"-",
|
|
1309
|
-
[
|
|
1310
|
-
6,
|
|
1311
|
-
"std.clamp",
|
|
1312
|
-
[
|
|
1313
|
-
[
|
|
1314
|
-
1,
|
|
1315
|
-
[
|
|
1316
|
-
7,
|
|
1317
|
-
"n",
|
|
1318
|
-
"z"
|
|
1319
|
-
],
|
|
1320
|
-
"*",
|
|
1321
|
-
[
|
|
1322
|
-
4,
|
|
1323
|
-
"-",
|
|
1324
|
-
[5, "1"]
|
|
1325
|
-
]
|
|
1326
|
-
],
|
|
1327
|
-
[5, "0"],
|
|
1328
|
-
[5, "1"]
|
|
1329
|
-
]
|
|
1330
|
-
]
|
|
1331
|
-
]]]]
|
|
1332
|
-
},
|
|
1333
|
-
externals: { "std.clamp": () => clamp$1 }
|
|
1334
|
-
}) && $.f)({}));
|
|
1335
|
-
const sharpGlint$1 = typegpu_default.fn([
|
|
1336
|
-
f32,
|
|
1337
|
-
f32,
|
|
1338
|
-
vec4f
|
|
1339
|
-
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((ndh, sharp, cfg) => {
|
|
1340
|
-
"use gpu";
|
|
1341
|
-
return __tsover_mul(pow$1(ndh, mix$1(cfg.x, cfg.y, sharp)), mix$1(cfg.z, cfg.w, sharp));
|
|
1342
|
-
}), {
|
|
1343
|
-
v: 2,
|
|
1344
|
-
name: void 0,
|
|
1345
|
-
ast: {
|
|
1346
|
-
"params": [
|
|
1347
|
-
{
|
|
1348
|
-
"type": "i",
|
|
1349
|
-
"name": "ndh"
|
|
1350
|
-
},
|
|
1351
|
-
{
|
|
1352
|
-
"type": "i",
|
|
1353
|
-
"name": "sharp"
|
|
1354
|
-
},
|
|
1355
|
-
{
|
|
1356
|
-
"type": "i",
|
|
1357
|
-
"name": "cfg"
|
|
1358
|
-
}
|
|
1359
|
-
],
|
|
1360
|
-
"body": [0, [[10, [
|
|
1361
|
-
1,
|
|
1362
|
-
[
|
|
1363
|
-
6,
|
|
1364
|
-
"std.pow",
|
|
1365
|
-
["ndh", [
|
|
1366
|
-
6,
|
|
1367
|
-
"std.mix",
|
|
1368
|
-
[
|
|
1369
|
-
[
|
|
1370
|
-
7,
|
|
1371
|
-
"cfg",
|
|
1372
|
-
"x"
|
|
1373
|
-
],
|
|
1374
|
-
[
|
|
1375
|
-
7,
|
|
1376
|
-
"cfg",
|
|
1377
|
-
"y"
|
|
1378
|
-
],
|
|
1379
|
-
"sharp"
|
|
1380
|
-
]
|
|
1381
|
-
]]
|
|
1382
|
-
],
|
|
1383
|
-
"*",
|
|
1384
|
-
[
|
|
1385
|
-
6,
|
|
1386
|
-
"std.mix",
|
|
1387
|
-
[
|
|
1388
|
-
[
|
|
1389
|
-
7,
|
|
1390
|
-
"cfg",
|
|
1391
|
-
"z"
|
|
1392
|
-
],
|
|
1393
|
-
[
|
|
1394
|
-
7,
|
|
1395
|
-
"cfg",
|
|
1396
|
-
"w"
|
|
1397
|
-
],
|
|
1398
|
-
"sharp"
|
|
1399
|
-
]
|
|
1400
|
-
]
|
|
1401
|
-
]]]]
|
|
1402
|
-
},
|
|
1403
|
-
externals: {
|
|
1404
|
-
"std.pow": () => pow$1,
|
|
1405
|
-
"std.mix": () => mix$1
|
|
1406
|
-
}
|
|
1407
|
-
}) && $.f)({}));
|
|
1408
|
-
const clampedPerlinGrad = typegpu_default.fn([vec2f, f32], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((q, gain) => {
|
|
1409
|
-
"use gpu";
|
|
1410
|
-
const gMax = f32(4);
|
|
1411
|
-
const nd = perlin12d(q);
|
|
1412
|
-
return vec2f(clamp$1(__tsover_mul(nd.y, gain), __tsover_mul(gMax, -1), gMax), clamp$1(__tsover_mul(nd.z, gain), __tsover_mul(gMax, -1), gMax));
|
|
1413
|
-
}), {
|
|
1414
|
-
v: 2,
|
|
1415
|
-
name: void 0,
|
|
1416
|
-
ast: {
|
|
1417
|
-
"params": [{
|
|
1418
|
-
"type": "i",
|
|
1419
|
-
"name": "q"
|
|
1420
|
-
}, {
|
|
1421
|
-
"type": "i",
|
|
1422
|
-
"name": "gain"
|
|
1423
|
-
}],
|
|
1424
|
-
"body": [0, [
|
|
1425
|
-
[
|
|
1426
|
-
13,
|
|
1427
|
-
"gMax",
|
|
1428
|
-
[
|
|
1429
|
-
6,
|
|
1430
|
-
"d.f32",
|
|
1431
|
-
[[5, "4"]]
|
|
1432
|
-
]
|
|
1433
|
-
],
|
|
1434
|
-
[
|
|
1435
|
-
13,
|
|
1436
|
-
"nd",
|
|
1437
|
-
[
|
|
1438
|
-
6,
|
|
1439
|
-
"perlin12d",
|
|
1440
|
-
["q"]
|
|
1441
|
-
]
|
|
1442
|
-
],
|
|
1443
|
-
[10, [
|
|
1444
|
-
6,
|
|
1445
|
-
"d.vec2f",
|
|
1446
|
-
[[
|
|
1447
|
-
6,
|
|
1448
|
-
"std.clamp",
|
|
1449
|
-
[
|
|
1450
|
-
[
|
|
1451
|
-
1,
|
|
1452
|
-
[
|
|
1453
|
-
7,
|
|
1454
|
-
"nd",
|
|
1455
|
-
"y"
|
|
1456
|
-
],
|
|
1457
|
-
"*",
|
|
1458
|
-
"gain"
|
|
1459
|
-
],
|
|
1460
|
-
[
|
|
1461
|
-
1,
|
|
1462
|
-
"gMax",
|
|
1463
|
-
"*",
|
|
1464
|
-
[
|
|
1465
|
-
4,
|
|
1466
|
-
"-",
|
|
1467
|
-
[5, "1"]
|
|
1468
|
-
]
|
|
1469
|
-
],
|
|
1470
|
-
"gMax"
|
|
1471
|
-
]
|
|
1472
|
-
], [
|
|
1473
|
-
6,
|
|
1474
|
-
"std.clamp",
|
|
1475
|
-
[
|
|
1476
|
-
[
|
|
1477
|
-
1,
|
|
1478
|
-
[
|
|
1479
|
-
7,
|
|
1480
|
-
"nd",
|
|
1481
|
-
"z"
|
|
1482
|
-
],
|
|
1483
|
-
"*",
|
|
1484
|
-
"gain"
|
|
1485
|
-
],
|
|
1486
|
-
[
|
|
1487
|
-
1,
|
|
1488
|
-
"gMax",
|
|
1489
|
-
"*",
|
|
1490
|
-
[
|
|
1491
|
-
4,
|
|
1492
|
-
"-",
|
|
1493
|
-
[5, "1"]
|
|
1494
|
-
]
|
|
1495
|
-
],
|
|
1496
|
-
"gMax"
|
|
1497
|
-
]
|
|
1498
|
-
]]
|
|
1499
|
-
]]
|
|
1500
|
-
]]
|
|
1501
|
-
},
|
|
1502
|
-
externals: {
|
|
1503
|
-
"d.f32": () => f32,
|
|
1504
|
-
"perlin12d": () => perlin12d,
|
|
1505
|
-
"d.vec2f": () => vec2f,
|
|
1506
|
-
"std.clamp": () => clamp$1
|
|
1507
|
-
}
|
|
1508
|
-
}) && $.f)({}));
|
|
1509
|
-
const nudgeNormal$1 = typegpu_default.fn([
|
|
1510
|
-
vec3f,
|
|
1511
|
-
f32,
|
|
1512
|
-
f32
|
|
1513
|
-
], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((n, dx, dy) => {
|
|
1514
|
-
"use gpu";
|
|
1515
|
-
return normalize$1(vec3f(__tsover_add(n.x, dx), __tsover_add(n.y, dy), n.z));
|
|
1516
|
-
}), {
|
|
1517
|
-
v: 2,
|
|
1518
|
-
name: void 0,
|
|
1519
|
-
ast: {
|
|
1520
|
-
"params": [
|
|
1521
|
-
{
|
|
1522
|
-
"type": "i",
|
|
1523
|
-
"name": "n"
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
"type": "i",
|
|
1527
|
-
"name": "dx"
|
|
1528
|
-
},
|
|
1529
|
-
{
|
|
1530
|
-
"type": "i",
|
|
1531
|
-
"name": "dy"
|
|
1532
|
-
}
|
|
1533
|
-
],
|
|
1534
|
-
"body": [0, [[10, [
|
|
1535
|
-
6,
|
|
1536
|
-
"std.normalize",
|
|
1537
|
-
[[
|
|
1538
|
-
6,
|
|
1539
|
-
"d.vec3f",
|
|
1540
|
-
[
|
|
1541
|
-
[
|
|
1542
|
-
1,
|
|
1543
|
-
[
|
|
1544
|
-
7,
|
|
1545
|
-
"n",
|
|
1546
|
-
"x"
|
|
1547
|
-
],
|
|
1548
|
-
"+",
|
|
1549
|
-
"dx"
|
|
1550
|
-
],
|
|
1551
|
-
[
|
|
1552
|
-
1,
|
|
1553
|
-
[
|
|
1554
|
-
7,
|
|
1555
|
-
"n",
|
|
1556
|
-
"y"
|
|
1557
|
-
],
|
|
1558
|
-
"+",
|
|
1559
|
-
"dy"
|
|
1560
|
-
],
|
|
1561
|
-
[
|
|
1562
|
-
7,
|
|
1563
|
-
"n",
|
|
1564
|
-
"z"
|
|
1565
|
-
]
|
|
1566
|
-
]
|
|
1567
|
-
]]
|
|
1568
|
-
]]]]
|
|
1569
|
-
},
|
|
1570
|
-
externals: {
|
|
1571
|
-
"std.normalize": () => normalize$1,
|
|
1572
|
-
"d.vec3f": () => vec3f
|
|
1573
|
-
}
|
|
1574
|
-
}) && $.f)({}));
|
|
1575
|
-
const opticalThickness$1 = typegpu_default.fn([f32, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((sdf, volumetric) => {
|
|
1576
|
-
"use gpu";
|
|
1577
|
-
const thickVol = clamp$1(__tsover_mul(__tsover_mul(sdf, -1), 2), 0, 1.2);
|
|
1578
|
-
return select(__tsover_mul(clamp$1(__tsover_mul(sdf, -1), 0, .5), 2), thickVol, volumetric > .5);
|
|
1579
|
-
}), {
|
|
1580
|
-
v: 2,
|
|
1581
|
-
name: void 0,
|
|
1582
|
-
ast: {
|
|
1583
|
-
"params": [{
|
|
1584
|
-
"type": "i",
|
|
1585
|
-
"name": "sdf"
|
|
1586
|
-
}, {
|
|
1587
|
-
"type": "i",
|
|
1588
|
-
"name": "volumetric"
|
|
1589
|
-
}],
|
|
1590
|
-
"body": [0, [
|
|
1591
|
-
[
|
|
1592
|
-
13,
|
|
1593
|
-
"thickVol",
|
|
1594
|
-
[
|
|
1595
|
-
6,
|
|
1596
|
-
"std.clamp",
|
|
1597
|
-
[
|
|
1598
|
-
[
|
|
1599
|
-
1,
|
|
1600
|
-
[
|
|
1601
|
-
1,
|
|
1602
|
-
"sdf",
|
|
1603
|
-
"*",
|
|
1604
|
-
[
|
|
1605
|
-
4,
|
|
1606
|
-
"-",
|
|
1607
|
-
[5, "1"]
|
|
1608
|
-
]
|
|
1609
|
-
],
|
|
1610
|
-
"*",
|
|
1611
|
-
[5, "2"]
|
|
1612
|
-
],
|
|
1613
|
-
[5, "0"],
|
|
1614
|
-
[5, "1.2"]
|
|
1615
|
-
]
|
|
1616
|
-
]
|
|
1617
|
-
],
|
|
1618
|
-
[
|
|
1619
|
-
13,
|
|
1620
|
-
"thickFlat",
|
|
1621
|
-
[
|
|
1622
|
-
1,
|
|
1623
|
-
[
|
|
1624
|
-
6,
|
|
1625
|
-
"std.clamp",
|
|
1626
|
-
[
|
|
1627
|
-
[
|
|
1628
|
-
1,
|
|
1629
|
-
"sdf",
|
|
1630
|
-
"*",
|
|
1631
|
-
[
|
|
1632
|
-
4,
|
|
1633
|
-
"-",
|
|
1634
|
-
[5, "1"]
|
|
1635
|
-
]
|
|
1636
|
-
],
|
|
1637
|
-
[5, "0"],
|
|
1638
|
-
[5, "0.5"]
|
|
1639
|
-
]
|
|
1640
|
-
],
|
|
1641
|
-
"*",
|
|
1642
|
-
[5, "2"]
|
|
1643
|
-
]
|
|
1644
|
-
],
|
|
1645
|
-
[10, [
|
|
1646
|
-
6,
|
|
1647
|
-
"std.select",
|
|
1648
|
-
[
|
|
1649
|
-
"thickFlat",
|
|
1650
|
-
"thickVol",
|
|
1651
|
-
[
|
|
1652
|
-
1,
|
|
1653
|
-
"volumetric",
|
|
1654
|
-
">",
|
|
1655
|
-
[5, "0.5"]
|
|
1656
|
-
]
|
|
1657
|
-
]
|
|
1658
|
-
]]
|
|
1659
|
-
]]
|
|
1660
|
-
},
|
|
1661
|
-
externals: {
|
|
1662
|
-
"std.clamp": () => clamp$1,
|
|
1663
|
-
"std.select": () => select
|
|
1664
|
-
}
|
|
1665
|
-
}) && $.f)({}));
|
|
1666
|
-
const beerLambert$1 = typegpu_default.fn([f32, vec3f], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((thickness, absorb) => {
|
|
1667
|
-
"use gpu";
|
|
1668
|
-
return vec3f(exp$1(__tsover_mul(__tsover_mul(thickness, absorb.x), -1)), exp$1(__tsover_mul(__tsover_mul(thickness, absorb.y), -1)), exp$1(__tsover_mul(__tsover_mul(thickness, absorb.z), -1)));
|
|
1669
|
-
}), {
|
|
1670
|
-
v: 2,
|
|
1671
|
-
name: void 0,
|
|
1672
|
-
ast: {
|
|
1673
|
-
"params": [{
|
|
1674
|
-
"type": "i",
|
|
1675
|
-
"name": "thickness"
|
|
1676
|
-
}, {
|
|
1677
|
-
"type": "i",
|
|
1678
|
-
"name": "absorb"
|
|
1679
|
-
}],
|
|
1680
|
-
"body": [0, [[10, [
|
|
1681
|
-
6,
|
|
1682
|
-
"d.vec3f",
|
|
1683
|
-
[
|
|
1684
|
-
[
|
|
1685
|
-
6,
|
|
1686
|
-
"std.exp",
|
|
1687
|
-
[[
|
|
1688
|
-
1,
|
|
1689
|
-
[
|
|
1690
|
-
1,
|
|
1691
|
-
"thickness",
|
|
1692
|
-
"*",
|
|
1693
|
-
[
|
|
1694
|
-
7,
|
|
1695
|
-
"absorb",
|
|
1696
|
-
"x"
|
|
1697
|
-
]
|
|
1698
|
-
],
|
|
1699
|
-
"*",
|
|
1700
|
-
[
|
|
1701
|
-
4,
|
|
1702
|
-
"-",
|
|
1703
|
-
[5, "1"]
|
|
1704
|
-
]
|
|
1705
|
-
]]
|
|
1706
|
-
],
|
|
1707
|
-
[
|
|
1708
|
-
6,
|
|
1709
|
-
"std.exp",
|
|
1710
|
-
[[
|
|
1711
|
-
1,
|
|
1712
|
-
[
|
|
1713
|
-
1,
|
|
1714
|
-
"thickness",
|
|
1715
|
-
"*",
|
|
1716
|
-
[
|
|
1717
|
-
7,
|
|
1718
|
-
"absorb",
|
|
1719
|
-
"y"
|
|
1720
|
-
]
|
|
1721
|
-
],
|
|
1722
|
-
"*",
|
|
1723
|
-
[
|
|
1724
|
-
4,
|
|
1725
|
-
"-",
|
|
1726
|
-
[5, "1"]
|
|
1727
|
-
]
|
|
1728
|
-
]]
|
|
1729
|
-
],
|
|
1730
|
-
[
|
|
1731
|
-
6,
|
|
1732
|
-
"std.exp",
|
|
1733
|
-
[[
|
|
1734
|
-
1,
|
|
1735
|
-
[
|
|
1736
|
-
1,
|
|
1737
|
-
"thickness",
|
|
1738
|
-
"*",
|
|
1739
|
-
[
|
|
1740
|
-
7,
|
|
1741
|
-
"absorb",
|
|
1742
|
-
"z"
|
|
1743
|
-
]
|
|
1744
|
-
],
|
|
1745
|
-
"*",
|
|
1746
|
-
[
|
|
1747
|
-
4,
|
|
1748
|
-
"-",
|
|
1749
|
-
[5, "1"]
|
|
1750
|
-
]
|
|
1751
|
-
]]
|
|
1752
|
-
]
|
|
1753
|
-
]
|
|
1754
|
-
]]]]
|
|
1755
|
-
},
|
|
1756
|
-
externals: {
|
|
1757
|
-
"d.vec3f": () => vec3f,
|
|
1758
|
-
"std.exp": () => exp$1
|
|
1759
|
-
}
|
|
1760
|
-
}) && $.f)({}));
|
|
1761
|
-
const flowWarpOffset = typegpu_default.fn([vec2f, f32], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((warpInput, flowT) => {
|
|
1762
|
-
"use gpu";
|
|
1763
|
-
return vec2f(__tsover_mul(sin$1(__tsover_add(__tsover_add(__tsover_mul(warpInput.x, 1.7), __tsover_mul(flowT, .7)), 1.7)), cos(__tsover_add(__tsover_add(__tsover_mul(warpInput.y, 1.3), __tsover_mul(flowT, .5)), 2.3))), __tsover_mul(cos(__tsover_add(__tsover_add(__tsover_mul(warpInput.x, 1.4), __tsover_mul(flowT, .9)), 8.7)), sin$1(__tsover_add(__tsover_add(__tsover_mul(warpInput.y, 1.6), __tsover_mul(flowT, .6)), 5.1))));
|
|
1764
|
-
}), {
|
|
1765
|
-
v: 2,
|
|
1766
|
-
name: void 0,
|
|
1767
|
-
ast: {
|
|
1768
|
-
"params": [{
|
|
1769
|
-
"type": "i",
|
|
1770
|
-
"name": "warpInput"
|
|
1771
|
-
}, {
|
|
1772
|
-
"type": "i",
|
|
1773
|
-
"name": "flowT"
|
|
1774
|
-
}],
|
|
1775
|
-
"body": [0, [
|
|
1776
|
-
[
|
|
1777
|
-
13,
|
|
1778
|
-
"wx",
|
|
1779
|
-
[
|
|
1780
|
-
1,
|
|
1781
|
-
[
|
|
1782
|
-
6,
|
|
1783
|
-
"std.sin",
|
|
1784
|
-
[[
|
|
1785
|
-
1,
|
|
1786
|
-
[
|
|
1787
|
-
1,
|
|
1788
|
-
[
|
|
1789
|
-
1,
|
|
1790
|
-
[
|
|
1791
|
-
7,
|
|
1792
|
-
"warpInput",
|
|
1793
|
-
"x"
|
|
1794
|
-
],
|
|
1795
|
-
"*",
|
|
1796
|
-
[5, "1.7"]
|
|
1797
|
-
],
|
|
1798
|
-
"+",
|
|
1799
|
-
[
|
|
1800
|
-
1,
|
|
1801
|
-
"flowT",
|
|
1802
|
-
"*",
|
|
1803
|
-
[5, "0.7"]
|
|
1804
|
-
]
|
|
1805
|
-
],
|
|
1806
|
-
"+",
|
|
1807
|
-
[5, "1.7"]
|
|
1808
|
-
]]
|
|
1809
|
-
],
|
|
1810
|
-
"*",
|
|
1811
|
-
[
|
|
1812
|
-
6,
|
|
1813
|
-
"std.cos",
|
|
1814
|
-
[[
|
|
1815
|
-
1,
|
|
1816
|
-
[
|
|
1817
|
-
1,
|
|
1818
|
-
[
|
|
1819
|
-
1,
|
|
1820
|
-
[
|
|
1821
|
-
7,
|
|
1822
|
-
"warpInput",
|
|
1823
|
-
"y"
|
|
1824
|
-
],
|
|
1825
|
-
"*",
|
|
1826
|
-
[5, "1.3"]
|
|
1827
|
-
],
|
|
1828
|
-
"+",
|
|
1829
|
-
[
|
|
1830
|
-
1,
|
|
1831
|
-
"flowT",
|
|
1832
|
-
"*",
|
|
1833
|
-
[5, "0.5"]
|
|
1834
|
-
]
|
|
1835
|
-
],
|
|
1836
|
-
"+",
|
|
1837
|
-
[5, "2.3"]
|
|
1838
|
-
]]
|
|
1839
|
-
]
|
|
1840
|
-
]
|
|
1841
|
-
],
|
|
1842
|
-
[
|
|
1843
|
-
13,
|
|
1844
|
-
"wy",
|
|
1845
|
-
[
|
|
1846
|
-
1,
|
|
1847
|
-
[
|
|
1848
|
-
6,
|
|
1849
|
-
"std.cos",
|
|
1850
|
-
[[
|
|
1851
|
-
1,
|
|
1852
|
-
[
|
|
1853
|
-
1,
|
|
1854
|
-
[
|
|
1855
|
-
1,
|
|
1856
|
-
[
|
|
1857
|
-
7,
|
|
1858
|
-
"warpInput",
|
|
1859
|
-
"x"
|
|
1860
|
-
],
|
|
1861
|
-
"*",
|
|
1862
|
-
[5, "1.4"]
|
|
1863
|
-
],
|
|
1864
|
-
"+",
|
|
1865
|
-
[
|
|
1866
|
-
1,
|
|
1867
|
-
"flowT",
|
|
1868
|
-
"*",
|
|
1869
|
-
[5, "0.9"]
|
|
1870
|
-
]
|
|
1871
|
-
],
|
|
1872
|
-
"+",
|
|
1873
|
-
[5, "8.7"]
|
|
1874
|
-
]]
|
|
1875
|
-
],
|
|
1876
|
-
"*",
|
|
1877
|
-
[
|
|
1878
|
-
6,
|
|
1879
|
-
"std.sin",
|
|
1880
|
-
[[
|
|
1881
|
-
1,
|
|
1882
|
-
[
|
|
1883
|
-
1,
|
|
1884
|
-
[
|
|
1885
|
-
1,
|
|
1886
|
-
[
|
|
1887
|
-
7,
|
|
1888
|
-
"warpInput",
|
|
1889
|
-
"y"
|
|
1890
|
-
],
|
|
1891
|
-
"*",
|
|
1892
|
-
[5, "1.6"]
|
|
1893
|
-
],
|
|
1894
|
-
"+",
|
|
1895
|
-
[
|
|
1896
|
-
1,
|
|
1897
|
-
"flowT",
|
|
1898
|
-
"*",
|
|
1899
|
-
[5, "0.6"]
|
|
1900
|
-
]
|
|
1901
|
-
],
|
|
1902
|
-
"+",
|
|
1903
|
-
[5, "5.1"]
|
|
1904
|
-
]]
|
|
1905
|
-
]
|
|
1906
|
-
]
|
|
1907
|
-
],
|
|
1908
|
-
[10, [
|
|
1909
|
-
6,
|
|
1910
|
-
"d.vec2f",
|
|
1911
|
-
["wx", "wy"]
|
|
1912
|
-
]]
|
|
1913
|
-
]]
|
|
1914
|
-
},
|
|
1915
|
-
externals: {
|
|
1916
|
-
"std.sin": () => sin$1,
|
|
1917
|
-
"std.cos": () => cos,
|
|
1918
|
-
"d.vec2f": () => vec2f
|
|
1919
|
-
}
|
|
1920
|
-
}) && $.f)({}));
|
|
1921
|
-
const studio5Softbox = typegpu_default.fn([
|
|
1922
|
-
f32,
|
|
1923
|
-
f32,
|
|
1924
|
-
f32,
|
|
1925
|
-
f32,
|
|
1926
|
-
f32,
|
|
1927
|
-
f32,
|
|
1928
|
-
f32,
|
|
1929
|
-
f32
|
|
1930
|
-
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((rx, ry, envC, envS, keyRad, drift, envStr, skyGain) => {
|
|
1931
|
-
"use gpu";
|
|
1932
|
-
const ex = __tsover_sub(__tsover_mul(rx, envC), __tsover_mul(ry, envS));
|
|
1933
|
-
const ey = __tsover_add(__tsover_mul(rx, envS), __tsover_mul(ry, envC));
|
|
1934
|
-
const p = vec2f(ex, ey);
|
|
1935
|
-
const sky = smoothstep$1(-.7, .85, ey);
|
|
1936
|
-
let lum = __tsover_mul(__tsover_mul(sky, sky), skyGain);
|
|
1937
|
-
const r0 = __tsover_mul(keyRad, 1);
|
|
1938
|
-
lum = __tsover_add(lum, __tsover_mul(__tsover_mul(smoothstep$1(r0, __tsover_mul(r0, .2), length$1(p.sub(vec2f(__tsover_add(0, drift), .55)))), 1.7), envStr));
|
|
1939
|
-
const r1 = __tsover_mul(keyRad, 1.15);
|
|
1940
|
-
lum = __tsover_add(lum, __tsover_mul(__tsover_mul(smoothstep$1(r1, __tsover_mul(r1, .2), length$1(p.sub(vec2f(__tsover_add(-.55, drift), .18)))), 1.05), envStr));
|
|
1941
|
-
const r2 = __tsover_mul(keyRad, 1);
|
|
1942
|
-
lum = __tsover_add(lum, __tsover_mul(__tsover_mul(smoothstep$1(r2, __tsover_mul(r2, .2), length$1(p.sub(vec2f(__tsover_add(.55, drift), .1)))), 1), envStr));
|
|
1943
|
-
const r3 = __tsover_mul(keyRad, 1.3);
|
|
1944
|
-
lum = __tsover_add(lum, __tsover_mul(__tsover_mul(smoothstep$1(r3, __tsover_mul(r3, .2), length$1(p.sub(vec2f(__tsover_add(.2, drift), -.5)))), .7), envStr));
|
|
1945
|
-
const r4 = __tsover_mul(keyRad, 1.1);
|
|
1946
|
-
lum = __tsover_add(lum, __tsover_mul(__tsover_mul(smoothstep$1(r4, __tsover_mul(r4, .2), length$1(p.sub(vec2f(__tsover_add(-.35, drift), -.25)))), .85), envStr));
|
|
1947
|
-
return lum;
|
|
1948
|
-
}), {
|
|
1949
|
-
v: 2,
|
|
1950
|
-
name: void 0,
|
|
1951
|
-
ast: {
|
|
1952
|
-
"params": [
|
|
1953
|
-
{
|
|
1954
|
-
"type": "i",
|
|
1955
|
-
"name": "rx"
|
|
1956
|
-
},
|
|
1957
|
-
{
|
|
1958
|
-
"type": "i",
|
|
1959
|
-
"name": "ry"
|
|
1960
|
-
},
|
|
1961
|
-
{
|
|
1962
|
-
"type": "i",
|
|
1963
|
-
"name": "envC"
|
|
1964
|
-
},
|
|
1965
|
-
{
|
|
1966
|
-
"type": "i",
|
|
1967
|
-
"name": "envS"
|
|
1968
|
-
},
|
|
1969
|
-
{
|
|
1970
|
-
"type": "i",
|
|
1971
|
-
"name": "keyRad"
|
|
1972
|
-
},
|
|
1973
|
-
{
|
|
1974
|
-
"type": "i",
|
|
1975
|
-
"name": "drift"
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
"type": "i",
|
|
1979
|
-
"name": "envStr"
|
|
1980
|
-
},
|
|
1981
|
-
{
|
|
1982
|
-
"type": "i",
|
|
1983
|
-
"name": "skyGain"
|
|
1984
|
-
}
|
|
1985
|
-
],
|
|
1986
|
-
"body": [0, [
|
|
1987
|
-
[
|
|
1988
|
-
13,
|
|
1989
|
-
"ex",
|
|
1990
|
-
[
|
|
1991
|
-
1,
|
|
1992
|
-
[
|
|
1993
|
-
1,
|
|
1994
|
-
"rx",
|
|
1995
|
-
"*",
|
|
1996
|
-
"envC"
|
|
1997
|
-
],
|
|
1998
|
-
"-",
|
|
1999
|
-
[
|
|
2000
|
-
1,
|
|
2001
|
-
"ry",
|
|
2002
|
-
"*",
|
|
2003
|
-
"envS"
|
|
2004
|
-
]
|
|
2005
|
-
]
|
|
2006
|
-
],
|
|
2007
|
-
[
|
|
2008
|
-
13,
|
|
2009
|
-
"ey",
|
|
2010
|
-
[
|
|
2011
|
-
1,
|
|
2012
|
-
[
|
|
2013
|
-
1,
|
|
2014
|
-
"rx",
|
|
2015
|
-
"*",
|
|
2016
|
-
"envS"
|
|
2017
|
-
],
|
|
2018
|
-
"+",
|
|
2019
|
-
[
|
|
2020
|
-
1,
|
|
2021
|
-
"ry",
|
|
2022
|
-
"*",
|
|
2023
|
-
"envC"
|
|
2024
|
-
]
|
|
2025
|
-
]
|
|
2026
|
-
],
|
|
2027
|
-
[
|
|
2028
|
-
13,
|
|
2029
|
-
"p",
|
|
2030
|
-
[
|
|
2031
|
-
6,
|
|
2032
|
-
"d.vec2f",
|
|
2033
|
-
["ex", "ey"]
|
|
2034
|
-
]
|
|
2035
|
-
],
|
|
2036
|
-
[
|
|
2037
|
-
13,
|
|
2038
|
-
"sky",
|
|
2039
|
-
[
|
|
2040
|
-
6,
|
|
2041
|
-
"std.smoothstep",
|
|
2042
|
-
[
|
|
2043
|
-
[
|
|
2044
|
-
4,
|
|
2045
|
-
"-",
|
|
2046
|
-
[5, "0.7"]
|
|
2047
|
-
],
|
|
2048
|
-
[5, "0.85"],
|
|
2049
|
-
"ey"
|
|
2050
|
-
]
|
|
2051
|
-
]
|
|
2052
|
-
],
|
|
2053
|
-
[
|
|
2054
|
-
12,
|
|
2055
|
-
"lum",
|
|
2056
|
-
[
|
|
2057
|
-
1,
|
|
2058
|
-
[
|
|
2059
|
-
1,
|
|
2060
|
-
"sky",
|
|
2061
|
-
"*",
|
|
2062
|
-
"sky"
|
|
2063
|
-
],
|
|
2064
|
-
"*",
|
|
2065
|
-
"skyGain"
|
|
2066
|
-
]
|
|
2067
|
-
],
|
|
2068
|
-
[
|
|
2069
|
-
13,
|
|
2070
|
-
"r0",
|
|
2071
|
-
[
|
|
2072
|
-
1,
|
|
2073
|
-
"keyRad",
|
|
2074
|
-
"*",
|
|
2075
|
-
[5, "1"]
|
|
2076
|
-
]
|
|
2077
|
-
],
|
|
2078
|
-
[
|
|
2079
|
-
2,
|
|
2080
|
-
"lum",
|
|
2081
|
-
"=",
|
|
2082
|
-
[
|
|
2083
|
-
1,
|
|
2084
|
-
"lum",
|
|
2085
|
-
"+",
|
|
2086
|
-
[
|
|
2087
|
-
1,
|
|
2088
|
-
[
|
|
2089
|
-
1,
|
|
2090
|
-
[
|
|
2091
|
-
6,
|
|
2092
|
-
"std.smoothstep",
|
|
2093
|
-
[
|
|
2094
|
-
"r0",
|
|
2095
|
-
[
|
|
2096
|
-
1,
|
|
2097
|
-
"r0",
|
|
2098
|
-
"*",
|
|
2099
|
-
[5, "0.2"]
|
|
2100
|
-
],
|
|
2101
|
-
[
|
|
2102
|
-
6,
|
|
2103
|
-
"std.length",
|
|
2104
|
-
[[
|
|
2105
|
-
6,
|
|
2106
|
-
[
|
|
2107
|
-
7,
|
|
2108
|
-
"p",
|
|
2109
|
-
"sub"
|
|
2110
|
-
],
|
|
2111
|
-
[[
|
|
2112
|
-
6,
|
|
2113
|
-
"d.vec2f",
|
|
2114
|
-
[[
|
|
2115
|
-
1,
|
|
2116
|
-
[5, "0"],
|
|
2117
|
-
"+",
|
|
2118
|
-
"drift"
|
|
2119
|
-
], [5, "0.55"]]
|
|
2120
|
-
]]
|
|
2121
|
-
]]
|
|
2122
|
-
]
|
|
2123
|
-
]
|
|
2124
|
-
],
|
|
2125
|
-
"*",
|
|
2126
|
-
[5, "1.7"]
|
|
2127
|
-
],
|
|
2128
|
-
"*",
|
|
2129
|
-
"envStr"
|
|
2130
|
-
]
|
|
2131
|
-
]
|
|
2132
|
-
],
|
|
2133
|
-
[
|
|
2134
|
-
13,
|
|
2135
|
-
"r1",
|
|
2136
|
-
[
|
|
2137
|
-
1,
|
|
2138
|
-
"keyRad",
|
|
2139
|
-
"*",
|
|
2140
|
-
[5, "1.15"]
|
|
2141
|
-
]
|
|
2142
|
-
],
|
|
2143
|
-
[
|
|
2144
|
-
2,
|
|
2145
|
-
"lum",
|
|
2146
|
-
"=",
|
|
2147
|
-
[
|
|
2148
|
-
1,
|
|
2149
|
-
"lum",
|
|
2150
|
-
"+",
|
|
2151
|
-
[
|
|
2152
|
-
1,
|
|
2153
|
-
[
|
|
2154
|
-
1,
|
|
2155
|
-
[
|
|
2156
|
-
6,
|
|
2157
|
-
"std.smoothstep",
|
|
2158
|
-
[
|
|
2159
|
-
"r1",
|
|
2160
|
-
[
|
|
2161
|
-
1,
|
|
2162
|
-
"r1",
|
|
2163
|
-
"*",
|
|
2164
|
-
[5, "0.2"]
|
|
2165
|
-
],
|
|
2166
|
-
[
|
|
2167
|
-
6,
|
|
2168
|
-
"std.length",
|
|
2169
|
-
[[
|
|
2170
|
-
6,
|
|
2171
|
-
[
|
|
2172
|
-
7,
|
|
2173
|
-
"p",
|
|
2174
|
-
"sub"
|
|
2175
|
-
],
|
|
2176
|
-
[[
|
|
2177
|
-
6,
|
|
2178
|
-
"d.vec2f",
|
|
2179
|
-
[[
|
|
2180
|
-
1,
|
|
2181
|
-
[
|
|
2182
|
-
4,
|
|
2183
|
-
"-",
|
|
2184
|
-
[5, "0.55"]
|
|
2185
|
-
],
|
|
2186
|
-
"+",
|
|
2187
|
-
"drift"
|
|
2188
|
-
], [5, "0.18"]]
|
|
2189
|
-
]]
|
|
2190
|
-
]]
|
|
2191
|
-
]
|
|
2192
|
-
]
|
|
2193
|
-
],
|
|
2194
|
-
"*",
|
|
2195
|
-
[5, "1.05"]
|
|
2196
|
-
],
|
|
2197
|
-
"*",
|
|
2198
|
-
"envStr"
|
|
2199
|
-
]
|
|
2200
|
-
]
|
|
2201
|
-
],
|
|
2202
|
-
[
|
|
2203
|
-
13,
|
|
2204
|
-
"r2",
|
|
2205
|
-
[
|
|
2206
|
-
1,
|
|
2207
|
-
"keyRad",
|
|
2208
|
-
"*",
|
|
2209
|
-
[5, "1"]
|
|
2210
|
-
]
|
|
2211
|
-
],
|
|
2212
|
-
[
|
|
2213
|
-
2,
|
|
2214
|
-
"lum",
|
|
2215
|
-
"=",
|
|
2216
|
-
[
|
|
2217
|
-
1,
|
|
2218
|
-
"lum",
|
|
2219
|
-
"+",
|
|
2220
|
-
[
|
|
2221
|
-
1,
|
|
2222
|
-
[
|
|
2223
|
-
1,
|
|
2224
|
-
[
|
|
2225
|
-
6,
|
|
2226
|
-
"std.smoothstep",
|
|
2227
|
-
[
|
|
2228
|
-
"r2",
|
|
2229
|
-
[
|
|
2230
|
-
1,
|
|
2231
|
-
"r2",
|
|
2232
|
-
"*",
|
|
2233
|
-
[5, "0.2"]
|
|
2234
|
-
],
|
|
2235
|
-
[
|
|
2236
|
-
6,
|
|
2237
|
-
"std.length",
|
|
2238
|
-
[[
|
|
2239
|
-
6,
|
|
2240
|
-
[
|
|
2241
|
-
7,
|
|
2242
|
-
"p",
|
|
2243
|
-
"sub"
|
|
2244
|
-
],
|
|
2245
|
-
[[
|
|
2246
|
-
6,
|
|
2247
|
-
"d.vec2f",
|
|
2248
|
-
[[
|
|
2249
|
-
1,
|
|
2250
|
-
[5, "0.55"],
|
|
2251
|
-
"+",
|
|
2252
|
-
"drift"
|
|
2253
|
-
], [5, "0.1"]]
|
|
2254
|
-
]]
|
|
2255
|
-
]]
|
|
2256
|
-
]
|
|
2257
|
-
]
|
|
2258
|
-
],
|
|
2259
|
-
"*",
|
|
2260
|
-
[5, "1"]
|
|
2261
|
-
],
|
|
2262
|
-
"*",
|
|
2263
|
-
"envStr"
|
|
2264
|
-
]
|
|
2265
|
-
]
|
|
2266
|
-
],
|
|
2267
|
-
[
|
|
2268
|
-
13,
|
|
2269
|
-
"r3",
|
|
2270
|
-
[
|
|
2271
|
-
1,
|
|
2272
|
-
"keyRad",
|
|
2273
|
-
"*",
|
|
2274
|
-
[5, "1.3"]
|
|
2275
|
-
]
|
|
2276
|
-
],
|
|
2277
|
-
[
|
|
2278
|
-
2,
|
|
2279
|
-
"lum",
|
|
2280
|
-
"=",
|
|
2281
|
-
[
|
|
2282
|
-
1,
|
|
2283
|
-
"lum",
|
|
2284
|
-
"+",
|
|
2285
|
-
[
|
|
2286
|
-
1,
|
|
2287
|
-
[
|
|
2288
|
-
1,
|
|
2289
|
-
[
|
|
2290
|
-
6,
|
|
2291
|
-
"std.smoothstep",
|
|
2292
|
-
[
|
|
2293
|
-
"r3",
|
|
2294
|
-
[
|
|
2295
|
-
1,
|
|
2296
|
-
"r3",
|
|
2297
|
-
"*",
|
|
2298
|
-
[5, "0.2"]
|
|
2299
|
-
],
|
|
2300
|
-
[
|
|
2301
|
-
6,
|
|
2302
|
-
"std.length",
|
|
2303
|
-
[[
|
|
2304
|
-
6,
|
|
2305
|
-
[
|
|
2306
|
-
7,
|
|
2307
|
-
"p",
|
|
2308
|
-
"sub"
|
|
2309
|
-
],
|
|
2310
|
-
[[
|
|
2311
|
-
6,
|
|
2312
|
-
"d.vec2f",
|
|
2313
|
-
[[
|
|
2314
|
-
1,
|
|
2315
|
-
[5, "0.2"],
|
|
2316
|
-
"+",
|
|
2317
|
-
"drift"
|
|
2318
|
-
], [
|
|
2319
|
-
4,
|
|
2320
|
-
"-",
|
|
2321
|
-
[5, "0.5"]
|
|
2322
|
-
]]
|
|
2323
|
-
]]
|
|
2324
|
-
]]
|
|
2325
|
-
]
|
|
2326
|
-
]
|
|
2327
|
-
],
|
|
2328
|
-
"*",
|
|
2329
|
-
[5, "0.7"]
|
|
2330
|
-
],
|
|
2331
|
-
"*",
|
|
2332
|
-
"envStr"
|
|
2333
|
-
]
|
|
2334
|
-
]
|
|
2335
|
-
],
|
|
2336
|
-
[
|
|
2337
|
-
13,
|
|
2338
|
-
"r4",
|
|
2339
|
-
[
|
|
2340
|
-
1,
|
|
2341
|
-
"keyRad",
|
|
2342
|
-
"*",
|
|
2343
|
-
[5, "1.1"]
|
|
2344
|
-
]
|
|
2345
|
-
],
|
|
2346
|
-
[
|
|
2347
|
-
2,
|
|
2348
|
-
"lum",
|
|
2349
|
-
"=",
|
|
2350
|
-
[
|
|
2351
|
-
1,
|
|
2352
|
-
"lum",
|
|
2353
|
-
"+",
|
|
2354
|
-
[
|
|
2355
|
-
1,
|
|
2356
|
-
[
|
|
2357
|
-
1,
|
|
2358
|
-
[
|
|
2359
|
-
6,
|
|
2360
|
-
"std.smoothstep",
|
|
2361
|
-
[
|
|
2362
|
-
"r4",
|
|
2363
|
-
[
|
|
2364
|
-
1,
|
|
2365
|
-
"r4",
|
|
2366
|
-
"*",
|
|
2367
|
-
[5, "0.2"]
|
|
2368
|
-
],
|
|
2369
|
-
[
|
|
2370
|
-
6,
|
|
2371
|
-
"std.length",
|
|
2372
|
-
[[
|
|
2373
|
-
6,
|
|
2374
|
-
[
|
|
2375
|
-
7,
|
|
2376
|
-
"p",
|
|
2377
|
-
"sub"
|
|
2378
|
-
],
|
|
2379
|
-
[[
|
|
2380
|
-
6,
|
|
2381
|
-
"d.vec2f",
|
|
2382
|
-
[[
|
|
2383
|
-
1,
|
|
2384
|
-
[
|
|
2385
|
-
4,
|
|
2386
|
-
"-",
|
|
2387
|
-
[5, "0.35"]
|
|
2388
|
-
],
|
|
2389
|
-
"+",
|
|
2390
|
-
"drift"
|
|
2391
|
-
], [
|
|
2392
|
-
4,
|
|
2393
|
-
"-",
|
|
2394
|
-
[5, "0.25"]
|
|
2395
|
-
]]
|
|
2396
|
-
]]
|
|
2397
|
-
]]
|
|
2398
|
-
]
|
|
2399
|
-
]
|
|
2400
|
-
],
|
|
2401
|
-
"*",
|
|
2402
|
-
[5, "0.85"]
|
|
2403
|
-
],
|
|
2404
|
-
"*",
|
|
2405
|
-
"envStr"
|
|
2406
|
-
]
|
|
2407
|
-
]
|
|
2408
|
-
],
|
|
2409
|
-
[10, "lum"]
|
|
2410
|
-
]]
|
|
2411
|
-
},
|
|
2412
|
-
externals: {
|
|
2413
|
-
"d.vec2f": () => vec2f,
|
|
2414
|
-
"std.smoothstep": () => smoothstep$1,
|
|
2415
|
-
"std.length": () => length$1
|
|
2416
|
-
}
|
|
2417
|
-
}) && $.f)({}));
|
|
2418
|
-
var bevel_exports = /* @__PURE__ */ __export({ bevelSin: () => bevelSin });
|
|
2419
|
-
const bevelSin = typegpu_default.fn([f32, f32], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((t, shape) => {
|
|
2420
|
-
"use gpu";
|
|
2421
|
-
const sRound = __tsover_sub(1, t);
|
|
2422
|
-
const k1 = smoothstep$1(0, .14, t);
|
|
2423
|
-
const k2 = smoothstep$1(.68, .92, t);
|
|
2424
|
-
return mix$1(sRound, mix$1(f32(1), __tsover_mul(.72, __tsover_sub(1, k2)), k1), shape);
|
|
2425
|
-
}), {
|
|
2426
|
-
v: 2,
|
|
2427
|
-
name: void 0,
|
|
2428
|
-
ast: {
|
|
2429
|
-
"params": [{
|
|
2430
|
-
"type": "i",
|
|
2431
|
-
"name": "t"
|
|
2432
|
-
}, {
|
|
2433
|
-
"type": "i",
|
|
2434
|
-
"name": "shape"
|
|
2435
|
-
}],
|
|
2436
|
-
"body": [0, [
|
|
2437
|
-
[
|
|
2438
|
-
13,
|
|
2439
|
-
"sRound",
|
|
2440
|
-
[
|
|
2441
|
-
1,
|
|
2442
|
-
[5, "1"],
|
|
2443
|
-
"-",
|
|
2444
|
-
"t"
|
|
2445
|
-
]
|
|
2446
|
-
],
|
|
2447
|
-
[
|
|
2448
|
-
13,
|
|
2449
|
-
"k1",
|
|
2450
|
-
[
|
|
2451
|
-
6,
|
|
2452
|
-
"std.smoothstep",
|
|
2453
|
-
[
|
|
2454
|
-
[5, "0"],
|
|
2455
|
-
[5, "0.14"],
|
|
2456
|
-
"t"
|
|
2457
|
-
]
|
|
2458
|
-
]
|
|
2459
|
-
],
|
|
2460
|
-
[
|
|
2461
|
-
13,
|
|
2462
|
-
"k2",
|
|
2463
|
-
[
|
|
2464
|
-
6,
|
|
2465
|
-
"std.smoothstep",
|
|
2466
|
-
[
|
|
2467
|
-
[5, "0.68"],
|
|
2468
|
-
[5, "0.92"],
|
|
2469
|
-
"t"
|
|
2470
|
-
]
|
|
2471
|
-
]
|
|
2472
|
-
],
|
|
2473
|
-
[
|
|
2474
|
-
13,
|
|
2475
|
-
"sMach",
|
|
2476
|
-
[
|
|
2477
|
-
6,
|
|
2478
|
-
"std.mix",
|
|
2479
|
-
[
|
|
2480
|
-
[
|
|
2481
|
-
6,
|
|
2482
|
-
"d.f32",
|
|
2483
|
-
[[5, "1"]]
|
|
2484
|
-
],
|
|
2485
|
-
[
|
|
2486
|
-
1,
|
|
2487
|
-
[5, "0.72"],
|
|
2488
|
-
"*",
|
|
2489
|
-
[
|
|
2490
|
-
1,
|
|
2491
|
-
[5, "1"],
|
|
2492
|
-
"-",
|
|
2493
|
-
"k2"
|
|
2494
|
-
]
|
|
2495
|
-
],
|
|
2496
|
-
"k1"
|
|
2497
|
-
]
|
|
2498
|
-
]
|
|
2499
|
-
],
|
|
2500
|
-
[10, [
|
|
2501
|
-
6,
|
|
2502
|
-
"std.mix",
|
|
2503
|
-
[
|
|
2504
|
-
"sRound",
|
|
2505
|
-
"sMach",
|
|
2506
|
-
"shape"
|
|
2507
|
-
]
|
|
2508
|
-
]]
|
|
2509
|
-
]]
|
|
2510
|
-
},
|
|
2511
|
-
externals: {
|
|
2512
|
-
"std.smoothstep": () => smoothstep$1,
|
|
2513
|
-
"std.mix": () => mix$1,
|
|
2514
|
-
"d.f32": () => f32
|
|
2515
|
-
}
|
|
2516
|
-
}) && $.f)({}));
|
|
2517
|
-
var { sdfSpaceUV, offsetUV } = glass_exports;
|
|
2518
|
-
var { ANALYTIC_SDF_EXTRA_FIELDS } = sdf_exports;
|
|
2519
|
-
var { createVolumetricFieldComputeNode, resolveShapeFieldSampler, VOLUMETRIC_FIELD_EXTRA_FIELDS } = sdf3d_exports;
|
|
2520
|
-
var guardCounter = 0;
|
|
2521
|
-
function guarded(cond, inner, fallback, hint = "guarded", deps = []) {
|
|
2522
|
-
const id = guardCounter++;
|
|
2523
|
-
return new Expr((ctx) => ctx.memo(`guard:${id}`, () => {
|
|
2524
|
-
const name = ctx.freshLocal(hint);
|
|
2525
|
-
const condText = cond._emit(ctx);
|
|
2526
|
-
const fallbackText = fallback._emit(ctx);
|
|
2527
|
-
for (const dep of deps) dep._emit(ctx);
|
|
2528
|
-
const stmts = [];
|
|
2529
|
-
const innerText = inner._emit({
|
|
2530
|
-
external: (v, h) => ctx.external(v, h),
|
|
2531
|
-
statement: (w) => stmts.push(w),
|
|
2532
|
-
freshLocal: (h) => ctx.freshLocal(h),
|
|
2533
|
-
memo: (k, f) => ctx.memo(k, f)
|
|
2534
|
-
});
|
|
2535
|
-
ctx.statement(`var ${name} = ${fallbackText};`);
|
|
2536
|
-
ctx.statement(`if (${condText}) {\n ${stmts.join("\n ")}\n ${name} = ${innerText};\n}`);
|
|
2537
|
-
return name;
|
|
2538
|
-
}));
|
|
2539
|
-
}
|
|
2540
|
-
function insideShape(sdf, pxH) {
|
|
2541
|
-
const outside = call(outsideShape, "outsideShape", [sdf, pxH]);
|
|
2542
|
-
return new Expr((ctx) => `(!(${outside._emit(ctx)}))`);
|
|
2543
|
-
}
|
|
2544
|
-
function shapedSurface(spec) {
|
|
2545
|
-
const pattern = spec.pattern ?? "none";
|
|
2546
|
-
const chord = spec.chord ?? "span";
|
|
2547
|
-
const stencil = spec.stencil ?? {
|
|
2548
|
-
kind: "forward",
|
|
2549
|
-
eps: .01
|
|
2550
|
-
};
|
|
2551
|
-
const compute = (params) => createVolumetricFieldComputeNode(params, () => params.getCpuValue("shape"), pattern, chord);
|
|
2552
|
-
const fragment = (params) => {
|
|
2553
|
-
const { childNode, computeOutputs, convertToTexture, uniforms, ctx } = params;
|
|
2554
|
-
let childTexture;
|
|
2555
|
-
if (spec.child === "required") {
|
|
2556
|
-
if (!childNode) return ZERO;
|
|
2557
|
-
childTexture = computeOutputs?.childTexture ?? convertToTexture(childNode);
|
|
2558
|
-
}
|
|
2559
|
-
const { sampler, gradSampler, texelSampler, volumetric, bakedGradients } = resolveShapeFieldSampler(params, {
|
|
2560
|
-
patternMode: pattern,
|
|
2561
|
-
gradSampler: spec.gradSampler ?? "fast",
|
|
2562
|
-
bakedGradients: spec.bakedGradients ?? "none"
|
|
2563
|
-
});
|
|
2564
|
-
const frame = {
|
|
2565
|
-
sampler,
|
|
2566
|
-
gradSampler,
|
|
2567
|
-
texelSampler,
|
|
2568
|
-
volumetric,
|
|
2569
|
-
bakedGradients,
|
|
2570
|
-
volFlag: floatE(volumetric ? 1 : 0),
|
|
2571
|
-
childTexture
|
|
2572
|
-
};
|
|
2573
|
-
if (stencil !== "none") {
|
|
2574
|
-
const screenUV = spec.placeUV ? spec.placeUV(params) : ctx.uv;
|
|
2575
|
-
frame.sdfUV = local(call(sdfSpaceUV, "sdfSpaceUV", [
|
|
2576
|
-
uniforms.center,
|
|
2577
|
-
uniforms.scale,
|
|
2578
|
-
uniforms.rotation,
|
|
2579
|
-
screenUV,
|
|
2580
|
-
ctx.aspect
|
|
2581
|
-
]), "sdfUV");
|
|
2582
|
-
frame.surf0 = (spec.centreTap === "fast" ? gradSampler : sampler)(frame.sdfUV);
|
|
2583
|
-
if (stencil !== "centre") {
|
|
2584
|
-
const { kind, eps } = stencil;
|
|
2585
|
-
frame.surfX = gradSampler(call(offsetUV, "offsetUV", [
|
|
2586
|
-
frame.sdfUV,
|
|
2587
|
-
floatE(eps),
|
|
2588
|
-
floatE(0)
|
|
2589
|
-
]));
|
|
2590
|
-
if (kind === "central") frame.surfL = gradSampler(call(offsetUV, "offsetUV", [
|
|
2591
|
-
frame.sdfUV,
|
|
2592
|
-
floatE(-eps),
|
|
2593
|
-
floatE(0)
|
|
2594
|
-
]));
|
|
2595
|
-
frame.surfY = gradSampler(call(offsetUV, "offsetUV", [
|
|
2596
|
-
frame.sdfUV,
|
|
2597
|
-
floatE(0),
|
|
2598
|
-
floatE(eps)
|
|
2599
|
-
]));
|
|
2600
|
-
if (kind === "central") frame.surfD = gradSampler(call(offsetUV, "offsetUV", [
|
|
2601
|
-
frame.sdfUV,
|
|
2602
|
-
floatE(0),
|
|
2603
|
-
floatE(-eps)
|
|
2604
|
-
]));
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
return spec.surface(frame, params);
|
|
2608
|
-
};
|
|
2609
|
-
return {
|
|
2610
|
-
extraFields: {
|
|
2611
|
-
...VOLUMETRIC_FIELD_EXTRA_FIELDS,
|
|
2612
|
-
...ANALYTIC_SDF_EXTRA_FIELDS
|
|
2613
|
-
},
|
|
2614
|
-
compute,
|
|
2615
|
-
gpu: { fragment }
|
|
2616
|
-
};
|
|
2617
|
-
}
|
|
2618
|
-
function surfaceField(frame, params, opts = {}) {
|
|
2619
|
-
const { ctx } = params;
|
|
2620
|
-
const s0 = local(frame.surf0, "s0");
|
|
2621
|
-
const pxH = local(div(1, ctx.viewportSize.member("y")), "pxH");
|
|
2622
|
-
const sdf = local(opts.scale ? div(s0.member("x"), opts.scale) : s0.member("x"), "sdf");
|
|
2623
|
-
const aspect = div(ctx.viewportSize.member("x"), ctx.viewportSize.member("y"));
|
|
2624
|
-
return {
|
|
2625
|
-
s0,
|
|
2626
|
-
sX: frame.surfX ? local(frame.surfX, "sX") : void 0,
|
|
2627
|
-
sY: frame.surfY ? local(frame.surfY, "sY") : void 0,
|
|
2628
|
-
sdf,
|
|
2629
|
-
pxH,
|
|
2630
|
-
aspect
|
|
2631
|
-
};
|
|
2632
|
-
}
|
|
2633
|
-
function geometricNormal(frame, field, opts) {
|
|
2634
|
-
const eps = float(opts.eps ?? .01);
|
|
2635
|
-
const hint = opts.hint ?? "nGeo";
|
|
2636
|
-
if (frame.volumetric) return local(call(volumetricNormal, "volumetricNormal", [
|
|
2637
|
-
field.s0,
|
|
2638
|
-
field.sX,
|
|
2639
|
-
field.sY,
|
|
2640
|
-
eps,
|
|
2641
|
-
float(opts.sharpness ?? 5)
|
|
2642
|
-
]), hint);
|
|
2643
|
-
const rimT = clamp(div(neg(field.sdf), max(opts.bevelWidth, .003)), 0, 1);
|
|
2644
|
-
return local(call(bevelledFlatNormal, "bevelledFlatNormal", [call(fieldGradient, "fieldGradient", [
|
|
2645
|
-
field.s0,
|
|
2646
|
-
field.sX,
|
|
2647
|
-
field.sY,
|
|
2648
|
-
eps
|
|
2649
|
-
]), call(bevelSin, "bevelSin", [rimT, opts.bevelShape])]), hint);
|
|
2650
|
-
}
|
|
2651
|
-
function surfacePattern(frame, field, opts = {}) {
|
|
2652
|
-
return local(call(patternCoords, "patternCoords", [
|
|
2653
|
-
opts.uv ?? frame.sdfUV,
|
|
2654
|
-
field.s0,
|
|
2655
|
-
frame.volFlag
|
|
2656
|
-
]), "pat");
|
|
2657
|
-
}
|
|
2658
|
-
function fieldSlope(field, eps = .01) {
|
|
2659
|
-
return local(call(fieldGradient, "fieldGradient", [
|
|
2660
|
-
field.s0,
|
|
2661
|
-
field.sX,
|
|
2662
|
-
field.sY,
|
|
2663
|
-
float(eps)
|
|
2664
|
-
]), "grad");
|
|
2665
|
-
}
|
|
2666
|
-
function viewRay(params, field, fov = .6) {
|
|
2667
|
-
return local(call(perspectiveViewRay, "perspectiveViewRay", [
|
|
2668
|
-
params.ctx.uv,
|
|
2669
|
-
field.aspect,
|
|
2670
|
-
float(fov)
|
|
2671
|
-
]), "viewI");
|
|
2672
|
-
}
|
|
2673
|
-
function grazingOf(n, view) {
|
|
2674
|
-
return local(sub(1, clamp(neg(dot(n, view)), 0, 1)), "grazing");
|
|
2675
|
-
}
|
|
2676
|
-
function tiltNormal(n, frame, slopes, hint = "n") {
|
|
2677
|
-
const terms = (axis) => {
|
|
2678
|
-
const out = [];
|
|
2679
|
-
if (slopes.across) out.push(mul(frame.perp.member(axis), slopes.across));
|
|
2680
|
-
if (slopes.along) out.push(mul(frame.tangent.member(axis), slopes.along));
|
|
2681
|
-
return out;
|
|
2682
|
-
};
|
|
2683
|
-
const sum = (base, extra) => extra.reduce((acc, e) => add(acc, e), base);
|
|
2684
|
-
return local(normalize(vec3(sum(n.member("x"), terms("x")), sum(n.member("y"), terms("y")), n.member("z"))), hint);
|
|
2685
|
-
}
|
|
2686
|
-
function studioSoftboxes(x, y, opts) {
|
|
2687
|
-
const toE = (v) => typeof v === "number" ? float(v) : v;
|
|
2688
|
-
return call(studio5Softbox, "studio5Softbox", [
|
|
2689
|
-
x,
|
|
2690
|
-
y,
|
|
2691
|
-
opts.rotation.member("x"),
|
|
2692
|
-
opts.rotation.member("y"),
|
|
2693
|
-
toE(opts.keyRadius),
|
|
2694
|
-
toE(opts.drift),
|
|
2695
|
-
toE(opts.strength),
|
|
2696
|
-
float(opts.skyGain)
|
|
2697
|
-
]);
|
|
2698
|
-
}
|
|
2699
|
-
function grainNoise(coords, opts) {
|
|
2700
|
-
let x = mul(coords.along, opts.freq[0]);
|
|
2701
|
-
let y = mul(coords.across, opts.freq[1]);
|
|
2702
|
-
if (opts.offset?.[0]) x = add(x, opts.offset[0]);
|
|
2703
|
-
if (opts.offset?.[1]) y = add(y, opts.offset[1]);
|
|
2704
|
-
if (opts.drift) x = add(x, opts.drift);
|
|
2705
|
-
return call(mxNoiseFloat2, "mxNoiseFloat2", [vec2(x, y)]);
|
|
2706
|
-
}
|
|
2707
|
-
function smearAlong(opts, sample) {
|
|
2708
|
-
const taps = opts.taps ?? 9;
|
|
2709
|
-
const sigma = opts.sigma ?? 2.1;
|
|
2710
|
-
const half = (taps - 1) / 2;
|
|
2711
|
-
const raw = Array.from({ length: taps }, (_, i) => Math.exp(-((i - half) ** 2) / (2 * sigma * sigma)));
|
|
2712
|
-
const sum = raw.reduce((a, b) => a + b, 0);
|
|
2713
|
-
const weights = raw.map((w) => w / sum);
|
|
2714
|
-
const step = local(div(opts.spread, half), "step");
|
|
2715
|
-
let acc = float(0);
|
|
2716
|
-
for (let i = 0; i < taps; i++) {
|
|
2717
|
-
const off = local(mul(step, float(i - half)), "off");
|
|
2718
|
-
acc = add(acc, mul(sample(add(opts.center.member("x"), mul(opts.axis.member("x"), off)), add(opts.center.member("y"), mul(opts.axis.member("y"), off))), float(weights[i])));
|
|
2719
|
-
}
|
|
2720
|
-
return local(acc, opts.hint ?? "smear");
|
|
2721
|
-
}
|
|
2722
|
-
function lightVec3(dir, z, hint = "L") {
|
|
2723
|
-
return local(normalize(vec3(dir.member("x"), dir.member("y"), float(z))), hint);
|
|
2724
|
-
}
|
|
2725
|
-
function wardAlphas(roughness, anisotropy) {
|
|
2726
|
-
const baseA = local(mix(.05, .45, roughness), "baseA");
|
|
2727
|
-
return {
|
|
2728
|
-
along: mul(baseA, add(1, mul(anisotropy, 7))),
|
|
2729
|
-
across: max(mul(baseA, sub(1, mul(anisotropy, .55))), .02)
|
|
2730
|
-
};
|
|
2731
|
-
}
|
|
2732
|
-
function anisoSpecular(opts) {
|
|
2733
|
-
const spec = call(wardAnisotropicSpecular, "wardAnisotropicSpecular", [call(WardSpecularInput, "WardSpecularInput", [
|
|
2734
|
-
opts.normal,
|
|
2735
|
-
vec3(opts.tangent.member("x"), opts.tangent.member("y"), 0),
|
|
2736
|
-
opts.light,
|
|
2737
|
-
opts.view,
|
|
2738
|
-
opts.alphas.along,
|
|
2739
|
-
opts.alphas.across
|
|
2740
|
-
])]);
|
|
2741
|
-
return opts.gain === void 0 ? spec : mul(spec, opts.gain);
|
|
2742
|
-
}
|
|
2743
|
-
function tiltAlong(n, axis, amount, hint = "n") {
|
|
2744
|
-
return local(normalize(vec3(add(n.member("x"), mul(axis.member("x"), amount)), add(n.member("y"), mul(axis.member("y"), amount)), n.member("z"))), hint);
|
|
2745
|
-
}
|
|
2746
|
-
function fresnelBoost(grazing, opts) {
|
|
2747
|
-
return add(1, mul(pow(grazing, float(opts.power ?? 3)), opts.amount));
|
|
2748
|
-
}
|
|
2749
|
-
function tintRamp(t, dark, light) {
|
|
2750
|
-
return mix(dark.member("rgb"), light.member("rgb"), splat3(t));
|
|
2751
|
-
}
|
|
2752
|
-
function silhouette(field, edgeSoftness) {
|
|
2753
|
-
return call(silhouetteAlpha, "silhouetteAlpha", [
|
|
2754
|
-
field.sdf,
|
|
2755
|
-
edgeSoftness,
|
|
2756
|
-
field.pxH
|
|
2757
|
-
]);
|
|
2758
|
-
}
|
|
2759
|
-
function neutralTone(rgb) {
|
|
2760
|
-
return call(neutral, "tonemapNeutral", [rgb]);
|
|
2761
|
-
}
|
|
2762
|
-
function nudgeNormal(n, dx, dy, hint = "n") {
|
|
2763
|
-
return local(call(nudgeNormal$1, "nudgeNormal", [
|
|
2764
|
-
n,
|
|
2765
|
-
dx,
|
|
2766
|
-
dy
|
|
2767
|
-
]), hint);
|
|
2768
|
-
}
|
|
2769
|
-
function marchedNormal(field, sharpness = 5, hint = "nGeo") {
|
|
2770
|
-
return local(call(volumetricNormal, "volumetricNormal", [
|
|
2771
|
-
field.s0,
|
|
2772
|
-
field.sX,
|
|
2773
|
-
field.sY,
|
|
2774
|
-
float(.01),
|
|
2775
|
-
float(sharpness)
|
|
2776
|
-
]), hint);
|
|
2777
|
-
}
|
|
2778
|
-
function keyLightAt(dir, elevation, hint = "kl") {
|
|
2779
|
-
return keyLightXY(dir.member("x"), dir.member("y"), elevation, hint);
|
|
2780
|
-
}
|
|
2781
|
-
function keyLightXY(x, y, elevation, hint = "kl") {
|
|
2782
|
-
return local(call(keyLight, "keyLight", [
|
|
2783
|
-
x,
|
|
2784
|
-
y,
|
|
2785
|
-
float(elevation)
|
|
2786
|
-
]), hint);
|
|
2787
|
-
}
|
|
2788
|
-
function grazingFlat(n) {
|
|
2789
|
-
return local(call(grazingView, "grazingView", [n]), "grazing");
|
|
2790
|
-
}
|
|
2791
|
-
function sharpGlint(ndh, sharpness, cfg) {
|
|
2792
|
-
return call(sharpGlint$1, "sharpGlint", [
|
|
2793
|
-
ndh,
|
|
2794
|
-
sharpness,
|
|
2795
|
-
cfg
|
|
2796
|
-
]);
|
|
2797
|
-
}
|
|
2798
|
-
function perlinSlope(q, gain) {
|
|
2799
|
-
return call(clampedPerlinGrad, "clampedPerlinGrad", [q, typeof gain === "number" ? float(gain) : gain]);
|
|
2800
|
-
}
|
|
2801
|
-
function opticalThickness(field, frame) {
|
|
2802
|
-
return call(opticalThickness$1, "opticalThickness", [field.sdf, frame.volFlag]);
|
|
2803
|
-
}
|
|
2804
|
-
function beerLambert(thickness, absorb) {
|
|
2805
|
-
return call(beerLambert$1, "beerLambert", [thickness, absorb]);
|
|
2806
|
-
}
|
|
2807
|
-
function flowWarp(warpInput, flowT) {
|
|
2808
|
-
return call(flowWarpOffset, "flowWarpOffset", [warpInput, flowT]);
|
|
2809
|
-
}
|
|
2810
|
-
function surfaceNoise(x, y) {
|
|
2811
|
-
return call(mxNoiseFloat2, "mxNoiseFloat2", [vec2(x, y)]);
|
|
2812
|
-
}
|
|
2813
|
-
function surfaceNoiseAt(p) {
|
|
2814
|
-
return call(mxNoiseFloat2, "mxNoiseFloat2", [p]);
|
|
2815
|
-
}
|
|
2816
|
-
function volumeNoiseAt(p) {
|
|
2817
|
-
return call(mxNoiseFloat3, "mxNoiseFloat3", [p]);
|
|
2818
|
-
}
|
|
2819
|
-
function cosineRainbow(t, phases) {
|
|
2820
|
-
return call(cosinePalette, "cosinePalette", [
|
|
2821
|
-
t,
|
|
2822
|
-
float(phases[0]),
|
|
2823
|
-
float(phases[1]),
|
|
2824
|
-
float(phases[2])
|
|
2825
|
-
]);
|
|
2826
|
-
}
|
|
2827
|
-
function cellNoiseAt(p) {
|
|
2828
|
-
return call(mxWorleyNoiseFloat2Pub, "mxWorleyNoiseFloat2Pub", [p, float(1)]);
|
|
2829
|
-
}
|
|
2830
|
-
function fdSlope(sampleAt, p, eps, hint = "fd") {
|
|
2831
|
-
const value = local(sampleAt(p), `${hint}0`);
|
|
2832
|
-
return {
|
|
2833
|
-
value,
|
|
2834
|
-
dx: local(div(sub(sampleAt(add(p, vec2(eps, 0))), value), eps), `${hint}X`),
|
|
2835
|
-
dy: local(div(sub(sampleAt(add(p, vec2(0, eps))), value), eps), `${hint}Y`)
|
|
2836
|
-
};
|
|
2837
|
-
}
|
|
2838
|
-
function hashNoise(x, y) {
|
|
2839
|
-
return call(hash12, "hash12", [vec2(x, y)]);
|
|
2840
|
-
}
|
|
2841
|
-
function valueNoise(x, y) {
|
|
2842
|
-
return call(value12, "value12", [vec2(x, y)]);
|
|
2843
|
-
}
|
|
2844
|
-
function rotationSensor(frame) {
|
|
2845
|
-
const s0C = local(frame.gradSampler(vec2(.5, .5)), "s0C");
|
|
2846
|
-
return {
|
|
2847
|
-
x: local(mul(neg(s0C.member("y")), frame.volFlag), "rotSenseX"),
|
|
2848
|
-
y: local(mul(neg(s0C.member("z")), frame.volFlag), "rotSenseY")
|
|
2849
|
-
};
|
|
2850
|
-
}
|
|
2851
|
-
function shellRefract(frame, n, amount) {
|
|
2852
|
-
const cx = local(sub(frame.sdfUV.member("x"), .5), "cx");
|
|
2853
|
-
const cy = local(sub(frame.sdfUV.member("y"), .5), "cy");
|
|
2854
|
-
return {
|
|
2855
|
-
x: local(add(cx, mul(n.member("x"), amount)), "bentX"),
|
|
2856
|
-
y: local(add(cy, mul(n.member("y"), amount)), "bentY"),
|
|
2857
|
-
centered: {
|
|
2858
|
-
x: cx,
|
|
2859
|
-
y: cy
|
|
2860
|
-
}
|
|
2861
|
-
};
|
|
2862
|
-
}
|
|
2863
|
-
function schlickFresnel(grazing, opts) {
|
|
2864
|
-
return add(opts.r0 ?? .04, mul(pow(grazing, float(opts.power ?? 5)), opts.gain));
|
|
2865
|
-
}
|
|
2866
|
-
function twinkle(t, phase, opts) {
|
|
2867
|
-
return add(sub(1, opts.amount), mul(sin(add(mul(t, opts.rate), mul(phase, opts.spread))), opts.amount));
|
|
2868
|
-
}
|
|
2869
|
-
function pointStars(p, opts) {
|
|
2870
|
-
const hint = opts.hint ?? "stars";
|
|
2871
|
-
const variation = local(add(mul(surfaceNoiseAt(mul(p, opts.variationFreq)), .5), .5), `${hint}V`);
|
|
2872
|
-
const shimmer = opts.shimmer ? opts.shimmer(variation) : float(1);
|
|
2873
|
-
const glint = local(mul(mul(mul(smoothstep(add(opts.radius[0], mul(variation, opts.radius[1])), 5e-4, cellNoiseAt(p)), smoothstep(opts.keep[0], opts.keep[1], variation)), mul(add(opts.brightness[0], mul(mul(variation, variation), opts.brightness[1])), shimmer)), opts.gain), hint);
|
|
2874
|
-
return {
|
|
2875
|
-
glint,
|
|
2876
|
-
variation,
|
|
2877
|
-
rgb: opts.tint ? mul(mix(vec3(...opts.tint.from), vec3(...opts.tint.to), splat3(variation)), splat3(mul(glint, opts.tint.gain))) : void 0
|
|
2878
|
-
};
|
|
2879
|
-
}
|
|
2880
|
-
function placementPoint(params, position, hint = "placed") {
|
|
2881
|
-
const { uniforms, ctx } = params;
|
|
2882
|
-
const screenUV = vec2(position.member("x"), sub(1, position.member("y")));
|
|
2883
|
-
return local(call(sdfSpaceUV, "sdfSpaceUV", [
|
|
2884
|
-
uniforms.center,
|
|
2885
|
-
uniforms.scale,
|
|
2886
|
-
uniforms.rotation,
|
|
2887
|
-
screenUV,
|
|
2888
|
-
ctx.aspect
|
|
2889
|
-
]), hint);
|
|
2890
|
-
}
|
|
2891
|
-
function continuedField(frame, field, params) {
|
|
2892
|
-
if (!(!frame.volumetric && Boolean(params.propValues.shapeSdfUrl))) return {
|
|
2893
|
-
sdf: field.sdf,
|
|
2894
|
-
outward: vec2(0, 0),
|
|
2895
|
-
at: (uv$1) => frame.gradSampler(uv$1).member("x")
|
|
2896
|
-
};
|
|
2897
|
-
const uv = frame.sdfUV;
|
|
2898
|
-
const beyond = (p) => sub(p, clamp(p, vec2(0, 0), vec2(1, 1)));
|
|
2899
|
-
const outward = local(beyond(uv), "outward");
|
|
2900
|
-
const continued = (border, dist) => max(border, max(dist, sub(border, dist)));
|
|
2901
|
-
return {
|
|
2902
|
-
sdf: local(continued(field.sdf, length(outward)), "sdfFar"),
|
|
2903
|
-
outward,
|
|
2904
|
-
at: (p) => {
|
|
2905
|
-
const dist = length(beyond(p));
|
|
2906
|
-
return continued(frame.gradSampler(p).member("x"), dist);
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
}
|
|
2910
|
-
function nearestEdge(sdfUV, sdf, slope, hint = "edge") {
|
|
2911
|
-
const normal = local(div(slope, max(length(slope), 1e-4)), `${hint}N`);
|
|
2912
|
-
return {
|
|
2913
|
-
point: local(sub(sdfUV, mul(normal, max(sdf, 0))), `${hint}P`),
|
|
2914
|
-
normal
|
|
2915
|
-
};
|
|
2916
|
-
}
|
|
2917
|
-
function pointLightFrom(light, at, hint = "pl") {
|
|
2918
|
-
const delta = local(sub(light.position, at), `${hint}D`);
|
|
2919
|
-
const distance = local(length(delta), `${hint}Dist`);
|
|
2920
|
-
const toLight = local(div(delta, max(distance, 1e-4)), `${hint}Dir`);
|
|
2921
|
-
return {
|
|
2922
|
-
L: local(normalize(vec3(delta.member("x"), delta.member("y"), neg(light.height))), `${hint}L`),
|
|
2923
|
-
toLight,
|
|
2924
|
-
distance
|
|
2925
|
-
};
|
|
2926
|
-
}
|
|
2927
|
-
function lambert(normal, light, opts = {}) {
|
|
2928
|
-
const ndl = dot(normal, light);
|
|
2929
|
-
if (opts.wrap === void 0) return max(ndl, 0);
|
|
2930
|
-
return clamp(div(add(ndl, opts.wrap), add(1, opts.wrap)), 0, 1);
|
|
2931
|
-
}
|
|
2932
|
-
function inverseSquare(distance, range) {
|
|
2933
|
-
const r = div(distance, range);
|
|
2934
|
-
return div(1, add(1, mul(r, r)));
|
|
2935
|
-
}
|
|
2936
|
-
function exposureTone(rgb) {
|
|
2937
|
-
return sub(1, exp(neg(rgb)));
|
|
2938
|
-
}
|
|
2939
|
-
function dualLobeGlint(ndh, opts) {
|
|
2940
|
-
const widen = opts.softness ? local(exp2(mix(2, -2, opts.softness)), "lobeWiden") : void 0;
|
|
2941
|
-
const exponent = (e) => widen ? mul(e, widen) : float(e);
|
|
2942
|
-
return mul(add(mul(pow(ndh, exponent(opts.core[0])), opts.core[1]), mul(pow(ndh, exponent(opts.halo[0])), opts.halo[1])), opts.gain);
|
|
2943
|
-
}
|
|
2944
|
-
export { bevel_exports as $, placementPoint as A, studioSoftboxes as B, lightVec3 as C, nudgeNormal as D, neutralTone as E, shapedSurface as F, tiltAlong as G, surfaceNoise as H, sharpGlint as I, twinkle as J, tiltNormal as K, shellRefract as L, pointStars as M, rotationSensor as N, opticalThickness as O, schlickFresnel as P, wardAlphas as Q, silhouette as R, lambert as S, nearestEdge as T, surfaceNoiseAt as U, surfaceField as V, surfacePattern as W, viewRay as X, valueNoise as Y, volumeNoiseAt as Z, hashNoise as _, cosineRainbow as a, keyLightAt as b, fdSlope as c, fresnelBoost as d, cosinePalette as et, geometricNormal as f, guarded as g, grazingOf as h, continuedField as i, pointLightFrom as j, perlinSlope as k, fieldSlope as l, grazingFlat as m, beerLambert as n, dualLobeGlint as o, grainNoise as p, tintRamp as q, cellNoiseAt as r, exposureTone as s, anisoSpecular as t, lighting_exports as tt, flowWarp as u, insideShape as v, marchedNormal as w, keyLightXY as x, inverseSquare as y, smearAlong as z };
|