lygia 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -33
- package/dist/color/blend/add/weslBundle.js +10 -0
- package/dist/color/blend/average/weslBundle.js +10 -0
- package/dist/color/blend/color/weslBundle.js +14 -0
- package/dist/color/blend/colorBurn/weslBundle.js +10 -0
- package/dist/color/blend/colorDodge/weslBundle.js +10 -0
- package/dist/color/blend/darken/weslBundle.js +10 -0
- package/dist/color/blend/difference/weslBundle.js +10 -0
- package/dist/color/blend/exclusion/weslBundle.js +10 -0
- package/dist/color/blend/glow/weslBundle.js +13 -0
- package/dist/color/blend/hardLight/weslBundle.js +13 -0
- package/dist/color/blend/hardMix/weslBundle.js +13 -0
- package/dist/color/blend/hue/weslBundle.js +14 -0
- package/dist/color/blend/lighten/weslBundle.js +10 -0
- package/dist/color/blend/linearBurn/weslBundle.js +10 -0
- package/dist/color/blend/linearDodge/weslBundle.js +10 -0
- package/dist/color/blend/linearLight/weslBundle.js +14 -0
- package/dist/color/blend/luminosity/weslBundle.js +14 -0
- package/dist/color/blend/multiply/weslBundle.js +10 -0
- package/dist/color/blend/negation/weslBundle.js +10 -0
- package/dist/color/blend/overlay/weslBundle.js +10 -0
- package/dist/color/blend/phoenix/weslBundle.js +10 -0
- package/dist/color/blend/pinLight/weslBundle.js +14 -0
- package/dist/color/blend/reflect/weslBundle.js +10 -0
- package/dist/color/blend/saturation/weslBundle.js +14 -0
- package/dist/color/blend/screen/weslBundle.js +10 -0
- package/dist/color/blend/softLight/weslBundle.js +10 -0
- package/dist/color/blend/subtract/weslBundle.js +10 -0
- package/dist/color/blend/vividLight/weslBundle.js +14 -0
- package/dist/color/brightnessContrast/weslBundle.js +10 -0
- package/dist/color/distance/weslBundle.js +23 -0
- package/dist/color/dither/bayer/weslBundle.js +13 -0
- package/dist/color/dither/blueNoise/weslBundle.js +13 -0
- package/dist/color/dither/vlachos/weslBundle.js +13 -0
- package/dist/color/exposure/weslBundle.js +10 -0
- package/dist/color/hueShift/weslBundle.js +14 -0
- package/dist/color/hueShiftRYB/weslBundle.js +19 -0
- package/dist/color/luma/weslBundle.js +13 -0
- package/dist/color/mixOklab/weslBundle.js +14 -0
- package/dist/color/mixSpectral/weslBundle.js +13 -0
- package/dist/color/palette/heatmap/weslBundle.js +10 -0
- package/dist/color/palette/hue/weslBundle.js +13 -0
- package/dist/color/saturationMatrix/weslBundle.js +10 -0
- package/dist/color/space/YCbCr2rgb/weslBundle.js +10 -0
- package/dist/color/space/YPbPr2rgb/weslBundle.js +10 -0
- package/dist/color/space/cmyk2rgb/weslBundle.js +10 -0
- package/dist/color/space/gamma2linear/weslBundle.js +10 -0
- package/dist/color/space/hcy2rgb/weslBundle.js +13 -0
- package/dist/color/space/hsl2rgb/weslBundle.js +13 -0
- package/dist/color/space/hsv2rgb/weslBundle.js +13 -0
- package/dist/color/space/hsv2ryb/weslBundle.js +14 -0
- package/dist/color/space/hue2rgb/weslBundle.js +10 -0
- package/dist/color/space/k2rgb/weslBundle.js +10 -0
- package/dist/color/space/lab2lch/weslBundle.js +10 -0
- package/dist/color/space/lab2rgb/weslBundle.js +14 -0
- package/dist/color/space/lab2srgb/weslBundle.js +14 -0
- package/dist/color/space/lab2xyz/weslBundle.js +10 -0
- package/dist/color/space/lch2lab/weslBundle.js +10 -0
- package/dist/color/space/lch2rgb/weslBundle.js +14 -0
- package/dist/color/space/linear2gamma/weslBundle.js +10 -0
- package/dist/color/space/lms2rgb/weslBundle.js +10 -0
- package/dist/color/space/oklab2rgb/weslBundle.js +10 -0
- package/dist/color/space/oklab2srgb/weslBundle.js +14 -0
- package/dist/color/space/rgb2YCbCr/weslBundle.js +10 -0
- package/dist/color/space/rgb2YPbPr/weslBundle.js +10 -0
- package/dist/color/space/rgb2cmyk/weslBundle.js +10 -0
- package/dist/color/space/rgb2hcv/weslBundle.js +10 -0
- package/dist/color/space/rgb2hcy/weslBundle.js +14 -0
- package/dist/color/space/rgb2heat/weslBundle.js +13 -0
- package/dist/color/space/rgb2hsl/weslBundle.js +13 -0
- package/dist/color/space/rgb2hsv/weslBundle.js +10 -0
- package/dist/color/space/rgb2hue/weslBundle.js +10 -0
- package/dist/color/space/rgb2lab/weslBundle.js +14 -0
- package/dist/color/space/rgb2lch/weslBundle.js +14 -0
- package/dist/color/space/rgb2lms/weslBundle.js +10 -0
- package/dist/color/space/rgb2luma/weslBundle.js +10 -0
- package/dist/color/space/rgb2oklab/weslBundle.js +10 -0
- package/dist/color/space/rgb2ryb/weslBundle.js +13 -0
- package/dist/color/space/rgb2srgb/weslBundle.js +10 -0
- package/dist/color/space/rgb2xyY/weslBundle.js +14 -0
- package/dist/color/space/rgb2xyz/weslBundle.js +10 -0
- package/dist/color/space/rgb2yiq/weslBundle.js +10 -0
- package/dist/color/space/rgb2yuv/weslBundle.js +10 -0
- package/dist/color/space/ryb2rgb/weslBundle.js +13 -0
- package/dist/color/space/srgb2lab/weslBundle.js +14 -0
- package/dist/color/space/srgb2lch/weslBundle.js +14 -0
- package/dist/color/space/srgb2luma/weslBundle.js +10 -0
- package/dist/color/space/srgb2oklab/weslBundle.js +14 -0
- package/dist/color/space/srgb2rgb/weslBundle.js +10 -0
- package/dist/color/space/srgb2xyz/weslBundle.js +14 -0
- package/dist/color/space/xyY2rgb/weslBundle.js +14 -0
- package/dist/color/space/xyY2srgb/weslBundle.js +14 -0
- package/dist/color/space/xyY2xyz/weslBundle.js +10 -0
- package/dist/color/space/xyz2lab/weslBundle.js +10 -0
- package/dist/color/space/xyz2rgb/weslBundle.js +10 -0
- package/dist/color/space/xyz2srgb/weslBundle.js +14 -0
- package/dist/color/space/xyz2xyY/weslBundle.js +10 -0
- package/dist/color/space/yiq2rgb/weslBundle.js +10 -0
- package/dist/color/space/yuv2rgb/weslBundle.js +10 -0
- package/dist/color/tonemap/aces/weslBundle.js +10 -0
- package/dist/color/tonemap/filmic/weslBundle.js +10 -0
- package/dist/color/tonemap/uncharted/weslBundle.js +10 -0
- package/dist/color/tonemap/uncharted2/weslBundle.js +10 -0
- package/dist/color/vibrance/weslBundle.js +13 -0
- package/dist/color/whiteBalance/weslBundle.js +10 -0
- package/dist/draw/stroke/weslBundle.js +10 -0
- package/dist/filter/edge/prewitt/weslBundle.js +10 -0
- package/dist/filter/sharpen/adaptive/weslBundle.js +10 -0
- package/dist/filter/sharpen/fast/weslBundle.js +10 -0
- package/dist/generative/cnoise/weslBundle.js +21 -0
- package/dist/generative/noised/weslBundle.js +13 -0
- package/dist/generative/pnoise/weslBundle.js +21 -0
- package/dist/generative/random/weslBundle.js +10 -0
- package/dist/generative/snoise/weslBundle.js +21 -0
- package/dist/generative/srandom/weslBundle.js +13 -0
- package/dist/generative/wavelet/weslBundle.js +14 -0
- package/dist/generative/worley/weslBundle.js +14 -0
- package/dist/lighting/common/ggx/weslBundle.js +10 -0
- package/dist/lighting/common/schlick/weslBundle.js +10 -0
- package/dist/lighting/diffuse/orenNayar/weslBundle.js +10 -0
- package/dist/lighting/fresnel/weslBundle.js +13 -0
- package/dist/lighting/fresnelReflection/weslBundle.js +13 -0
- package/dist/lighting/raymarch/cast/weslBundle.js +10 -0
- package/dist/lighting/raymarch/normal/weslBundle.js +10 -0
- package/dist/lighting/specular/cookTorrance/weslBundle.js +13 -0
- package/dist/lighting/toShininess/weslBundle.js +10 -0
- package/dist/math/aafloor/weslBundle.js +13 -0
- package/dist/math/aafract/weslBundle.js +13 -0
- package/dist/math/aastep/weslBundle.js +10 -0
- package/dist/math/adaptiveThreshold/weslBundle.js +10 -0
- package/dist/math/bump/weslBundle.js +10 -0
- package/dist/math/consts/weslBundle.js +10 -0
- package/dist/math/cubic/weslBundle.js +10 -0
- package/dist/math/cubicMix/weslBundle.js +13 -0
- package/dist/math/decimate/weslBundle.js +10 -0
- package/dist/math/dist/weslBundle.js +10 -0
- package/dist/math/gain/weslBundle.js +10 -0
- package/dist/math/gaussian/weslBundle.js +10 -0
- package/dist/math/grad4/weslBundle.js +10 -0
- package/dist/math/highPass/weslBundle.js +10 -0
- package/dist/math/inside/weslBundle.js +10 -0
- package/dist/math/invCubic/weslBundle.js +10 -0
- package/dist/math/invQuartic/weslBundle.js +10 -0
- package/dist/math/inverse/weslBundle.js +10 -0
- package/dist/math/lengthSq/weslBundle.js +10 -0
- package/dist/math/map/weslBundle.js +10 -0
- package/dist/math/mirror/weslBundle.js +10 -0
- package/dist/math/mmax/weslBundle.js +10 -0
- package/dist/math/mmin/weslBundle.js +10 -0
- package/dist/math/mod/weslBundle.js +10 -0
- package/dist/math/mod289/weslBundle.js +10 -0
- package/dist/math/pack/weslBundle.js +10 -0
- package/dist/math/parabola/weslBundle.js +10 -0
- package/dist/math/permute/weslBundle.js +13 -0
- package/dist/math/powFast/weslBundle.js +10 -0
- package/dist/math/quartic/weslBundle.js +10 -0
- package/dist/math/quat/weslBundle.js +10 -0
- package/dist/math/quintic/weslBundle.js +10 -0
- package/dist/math/rotate2d/weslBundle.js +10 -0
- package/dist/math/rotate3d/weslBundle.js +10 -0
- package/dist/math/rotate3dX/weslBundle.js +10 -0
- package/dist/math/rotate3dY/weslBundle.js +10 -0
- package/dist/math/rotate3dZ/weslBundle.js +10 -0
- package/dist/math/rotate4d/weslBundle.js +10 -0
- package/dist/math/rotate4dX/weslBundle.js +10 -0
- package/dist/math/rotate4dY/weslBundle.js +10 -0
- package/dist/math/rotate4dZ/weslBundle.js +10 -0
- package/dist/math/round/weslBundle.js +10 -0
- package/dist/math/scale2d/weslBundle.js +10 -0
- package/dist/math/scale3d/weslBundle.js +10 -0
- package/dist/math/scale4d/weslBundle.js +10 -0
- package/dist/math/smootherstep/weslBundle.js +13 -0
- package/dist/math/sum/weslBundle.js +10 -0
- package/dist/math/taylorInvSqrt/weslBundle.js +10 -0
- package/dist/math/toMat4/weslBundle.js +10 -0
- package/dist/math/translate4d/weslBundle.js +10 -0
- package/dist/math/unpack/weslBundle.js +10 -0
- package/dist/math/within/weslBundle.js +10 -0
- package/dist/sdf/boxSDF/weslBundle.js +10 -0
- package/dist/sdf/cylinderSDF/weslBundle.js +10 -0
- package/dist/sdf/opSubtraction/weslBundle.js +10 -0
- package/dist/sdf/opUnion/weslBundle.js +10 -0
- package/dist/sdf/rectSDF/weslBundle.js +10 -0
- package/dist/sdf/sphereSDF/weslBundle.js +10 -0
- package/dist/sdf/torusSDF/weslBundle.js +10 -0
- package/dist/space/fisheye2xyz/weslBundle.js +13 -0
- package/dist/space/nearest/weslBundle.js +10 -0
- package/dist/space/ratio/weslBundle.js +10 -0
- package/dist/space/rotate/weslBundle.js +13 -0
- package/dist/space/scale/weslBundle.js +10 -0
- package/dist/version/weslBundle.js +10 -0
- package/dist/weslBundle.d.ts +19 -0
- package/package.json +16 -3
- package/.github/FUNDING.yml +0 -12
- package/CONTRIBUTE.md +0 -21
- package/DESIGN.md +0 -137
- package/EXAMPLES.md +0 -23
- package/README_GLSL.md +0 -27
- package/README_METAL.md +0 -56
- package/animation/easing/back.glsl +0 -11
- package/animation/easing/back.hlsl +0 -36
- package/animation/easing/backIn.glsl +0 -14
- package/animation/easing/backInOut.glsl +0 -24
- package/animation/easing/backOut.glsl +0 -14
- package/animation/easing/bounce.glsl +0 -16
- package/animation/easing/bounce.hlsl +0 -46
- package/animation/easing/bounceIn.glsl +0 -14
- package/animation/easing/bounceInOut.glsl +0 -18
- package/animation/easing/bounceOut.glsl +0 -32
- package/animation/easing/circular.glsl +0 -11
- package/animation/easing/circular.hlsl +0 -28
- package/animation/easing/circularIn.glsl +0 -12
- package/animation/easing/circularInOut.glsl +0 -16
- package/animation/easing/circularOut.glsl +0 -12
- package/animation/easing/cubic.glsl +0 -11
- package/animation/easing/cubic.hlsl +0 -29
- package/animation/easing/cubicIn.glsl +0 -12
- package/animation/easing/cubicInOut.glsl +0 -16
- package/animation/easing/cubicOut.glsl +0 -16
- package/animation/easing/elastic.glsl +0 -11
- package/animation/easing/elastic.hlsl +0 -30
- package/animation/easing/elasticIn.glsl +0 -14
- package/animation/easing/elasticInOut.glsl +0 -18
- package/animation/easing/elasticOut.glsl +0 -14
- package/animation/easing/exponential.glsl +0 -11
- package/animation/easing/exponential.hlsl +0 -30
- package/animation/easing/exponentialIn.glsl +0 -12
- package/animation/easing/exponentialInOut.glsl +0 -18
- package/animation/easing/exponentialOut.glsl +0 -12
- package/animation/easing/linear.glsl +0 -11
- package/animation/easing/linear.hlsl +0 -20
- package/animation/easing/linearIn.glsl +0 -12
- package/animation/easing/linearInOut.glsl +0 -12
- package/animation/easing/linearOut.glsl +0 -12
- package/animation/easing/quadratic.glsl +0 -11
- package/animation/easing/quadratic.hlsl +0 -27
- package/animation/easing/quadraticIn.glsl +0 -12
- package/animation/easing/quadraticInOut.glsl +0 -15
- package/animation/easing/quadraticOut.glsl +0 -12
- package/animation/easing/quartic.glsl +0 -11
- package/animation/easing/quartic.hlsl +0 -28
- package/animation/easing/quarticIn.glsl +0 -12
- package/animation/easing/quarticInOut.glsl +0 -16
- package/animation/easing/quarticOut.glsl +0 -15
- package/animation/easing/quintic.glsl +0 -11
- package/animation/easing/quintic.hlsl +0 -28
- package/animation/easing/quinticIn.glsl +0 -12
- package/animation/easing/quinticInOut.glsl +0 -16
- package/animation/easing/quinticOut.glsl +0 -12
- package/animation/easing/sine.glsl +0 -13
- package/animation/easing/sine.hlsl +0 -28
- package/animation/easing/sineIn.glsl +0 -14
- package/animation/easing/sineInOut.glsl +0 -14
- package/animation/easing/sineOut.glsl +0 -14
- package/animation/easing.glsl +0 -15
- package/animation/easing.hlsl +0 -15
- package/animation/spriteLoop.glsl +0 -26
- package/animation/spriteLoop.hlsl +0 -25
- package/color/blend/add.glsl +0 -13
- package/color/blend/add.hlsl +0 -21
- package/color/blend/add.msl +0 -13
- package/color/blend/average.glsl +0 -13
- package/color/blend/average.hlsl +0 -21
- package/color/blend/average.msl +0 -13
- package/color/blend/color.glsl +0 -22
- package/color/blend/color.msl +0 -23
- package/color/blend/colorBurn.glsl +0 -17
- package/color/blend/colorBurn.hlsl +0 -23
- package/color/blend/colorBurn.msl +0 -17
- package/color/blend/colorDodge.glsl +0 -17
- package/color/blend/colorDodge.hlsl +0 -23
- package/color/blend/colorDodge.msl +0 -17
- package/color/blend/darken.glsl +0 -17
- package/color/blend/darken.hlsl +0 -23
- package/color/blend/darken.msl +0 -17
- package/color/blend/difference.glsl +0 -13
- package/color/blend/difference.hlsl +0 -21
- package/color/blend/difference.msl +0 -13
- package/color/blend/exclusion.glsl +0 -13
- package/color/blend/exclusion.hlsl +0 -21
- package/color/blend/exclusion.msl +0 -13
- package/color/blend/glow.glsl +0 -23
- package/color/blend/glow.hlsl +0 -23
- package/color/blend/glow.msl +0 -23
- package/color/blend/hardLight.glsl +0 -23
- package/color/blend/hardLight.hlsl +0 -23
- package/color/blend/hardLight.msl +0 -23
- package/color/blend/hardMix.glsl +0 -25
- package/color/blend/hardMix.hlsl +0 -25
- package/color/blend/hardMix.msl +0 -25
- package/color/blend/hue.glsl +0 -22
- package/color/blend/hue.msl +0 -22
- package/color/blend/lighten.glsl +0 -23
- package/color/blend/lighten.hlsl +0 -23
- package/color/blend/lighten.msl +0 -23
- package/color/blend/linearBurn.glsl +0 -23
- package/color/blend/linearBurn.hlsl +0 -23
- package/color/blend/linearBurn.msl +0 -23
- package/color/blend/linearDodge.glsl +0 -23
- package/color/blend/linearDodge.hlsl +0 -23
- package/color/blend/linearDodge.msl +0 -23
- package/color/blend/linearLight.glsl +0 -26
- package/color/blend/linearLight.msl +0 -26
- package/color/blend/luminosity.glsl +0 -22
- package/color/blend/luminosity.msl +0 -22
- package/color/blend/multiply.glsl +0 -21
- package/color/blend/multiply.hlsl +0 -21
- package/color/blend/multiply.msl +0 -21
- package/color/blend/multiply.wgsl +0 -18
- package/color/blend/negation.glsl +0 -21
- package/color/blend/negation.hlsl +0 -21
- package/color/blend/negation.msl +0 -21
- package/color/blend/overlay.glsl +0 -23
- package/color/blend/overlay.hlsl +0 -23
- package/color/blend/overlay.msl +0 -23
- package/color/blend/overlay.wgsl +0 -24
- package/color/blend/phoenix.glsl +0 -21
- package/color/blend/phoenix.hlsl +0 -21
- package/color/blend/phoenix.msl +0 -21
- package/color/blend/pinLight.glsl +0 -26
- package/color/blend/pinLight.hlsl +0 -26
- package/color/blend/pinLight.msl +0 -26
- package/color/blend/reflect.glsl +0 -23
- package/color/blend/reflect.hlsl +0 -23
- package/color/blend/reflect.msl +0 -23
- package/color/blend/saturation.glsl +0 -22
- package/color/blend/saturation.msl +0 -22
- package/color/blend/screen.glsl +0 -23
- package/color/blend/screen.hlsl +0 -22
- package/color/blend/screen.msl +0 -23
- package/color/blend/screen.wgsl +0 -20
- package/color/blend/softLight.glsl +0 -30
- package/color/blend/softLight.hlsl +0 -31
- package/color/blend/softLight.msl +0 -30
- package/color/blend/softLight.wgsl +0 -31
- package/color/blend/subtract.glsl +0 -21
- package/color/blend/subtract.hlsl +0 -21
- package/color/blend/subtract.msl +0 -21
- package/color/blend/vividLight.glsl +0 -26
- package/color/blend/vividLight.hlsl +0 -26
- package/color/blend/vividLight.msl +0 -26
- package/color/blend.glsl +0 -28
- package/color/blend.hlsl +0 -24
- package/color/blend.msl +0 -28
- package/color/brightnessContrast.glsl +0 -17
- package/color/brightnessContrast.hlsl +0 -25
- package/color/brightnessContrast.msl +0 -12
- package/color/brightnessContrast.wgsl +0 -16
- package/color/brightnessMatrix.glsl +0 -20
- package/color/brightnessMatrix.hlsl +0 -20
- package/color/brightnessMatrix.msl +0 -18
- package/color/composite/compositeXor.glsl +0 -27
- package/color/composite/compositeXor.hlsl +0 -29
- package/color/composite/compositeXor.msl +0 -32
- package/color/composite/destinationAtop.glsl +0 -29
- package/color/composite/destinationAtop.hlsl +0 -29
- package/color/composite/destinationAtop.msl +0 -32
- package/color/composite/destinationIn.glsl +0 -29
- package/color/composite/destinationIn.hlsl +0 -30
- package/color/composite/destinationIn.msl +0 -33
- package/color/composite/destinationOut.glsl +0 -29
- package/color/composite/destinationOut.hlsl +0 -29
- package/color/composite/destinationOut.msl +0 -32
- package/color/composite/destinationOver.glsl +0 -29
- package/color/composite/destinationOver.hlsl +0 -29
- package/color/composite/destinationOver.msl +0 -32
- package/color/composite/sourceAtop.glsl +0 -29
- package/color/composite/sourceAtop.hlsl +0 -29
- package/color/composite/sourceAtop.msl +0 -32
- package/color/composite/sourceIn.glsl +0 -30
- package/color/composite/sourceIn.hlsl +0 -30
- package/color/composite/sourceIn.msl +0 -33
- package/color/composite/sourceOut.glsl +0 -29
- package/color/composite/sourceOut.hlsl +0 -29
- package/color/composite/sourceOut.msl +0 -32
- package/color/composite/sourceOver.glsl +0 -32
- package/color/composite/sourceOver.hlsl +0 -32
- package/color/composite/sourceOver.msl +0 -35
- package/color/composite.glsl +0 -9
- package/color/composite.hlsl +0 -9
- package/color/composite.msl +0 -9
- package/color/contrast.glsl +0 -15
- package/color/contrast.hlsl +0 -23
- package/color/contrast.msl +0 -15
- package/color/contrastMatrix.glsl +0 -21
- package/color/contrastMatrix.hlsl +0 -21
- package/color/contrastMatrix.msl +0 -19
- package/color/daltonize.glsl +0 -186
- package/color/daltonize.hlsl +0 -187
- package/color/daltonize.msl +0 -184
- package/color/desaturate.glsl +0 -19
- package/color/desaturate.hlsl +0 -20
- package/color/desaturate.msl +0 -19
- package/color/distance.glsl +0 -55
- package/color/distance.hlsl +0 -55
- package/color/distance.msl +0 -55
- package/color/distance.wgsl +0 -55
- package/color/dither/bayer.glsl +0 -82
- package/color/dither/bayer.msl +0 -49
- package/color/dither/bayer.wgsl +0 -45
- package/color/dither/blueNoise.glsl +0 -142
- package/color/dither/blueNoise.hlsl +0 -90
- package/color/dither/blueNoise.msl +0 -131
- package/color/dither/blueNoise.wgsl +0 -47
- package/color/dither/interleavedGradientNoise.glsl +0 -82
- package/color/dither/interleavedGradientNoise.hlsl +0 -47
- package/color/dither/interleavedGradientNoise.msl +0 -70
- package/color/dither/shift.glsl +0 -102
- package/color/dither/shift.hlsl +0 -76
- package/color/dither/shift.msl +0 -91
- package/color/dither/triangleNoise.glsl +0 -79
- package/color/dither/triangleNoise.hlsl +0 -76
- package/color/dither/triangleNoise.msl +0 -79
- package/color/dither/vlachos.glsl +0 -80
- package/color/dither/vlachos.hlsl +0 -45
- package/color/dither/vlachos.msl +0 -73
- package/color/dither/vlachos.wgsl +0 -28
- package/color/dither.glsl +0 -43
- package/color/dither.hlsl +0 -74
- package/color/dither.msl +0 -43
- package/color/exposure.glsl +0 -15
- package/color/exposure.hlsl +0 -23
- package/color/exposure.msl +0 -15
- package/color/exposure.wgsl +0 -11
- package/color/hueShift.glsl +0 -33
- package/color/hueShift.hlsl +0 -31
- package/color/hueShift.msl +0 -33
- package/color/hueShift.wgsl +0 -22
- package/color/hueShiftRYB.glsl +0 -31
- package/color/hueShiftRYB.hlsl +0 -31
- package/color/hueShiftRYB.msl +0 -31
- package/color/hueShiftRYB.wgsl +0 -24
- package/color/layer/addSourceOver.glsl +0 -30
- package/color/layer/addSourceOver.hlsl +0 -30
- package/color/layer/addSourceOver.msl +0 -31
- package/color/layer/averageSourceOver.glsl +0 -30
- package/color/layer/averageSourceOver.hlsl +0 -30
- package/color/layer/averageSourceOver.msl +0 -31
- package/color/layer/colorBurnSourceOver.glsl +0 -30
- package/color/layer/colorBurnSourceOver.hlsl +0 -30
- package/color/layer/colorBurnSourceOver.msl +0 -31
- package/color/layer/colorDodgeSourceOver.glsl +0 -30
- package/color/layer/colorDodgeSourceOver.hlsl +0 -30
- package/color/layer/colorDodgeSourceOver.msl +0 -31
- package/color/layer/colorSourceOver.glsl +0 -30
- package/color/layer/colorSourceOver.hlsl +0 -30
- package/color/layer/colorSourceOver.msl +0 -31
- package/color/layer/darkenSourceOver.glsl +0 -30
- package/color/layer/darkenSourceOver.hlsl +0 -30
- package/color/layer/darkenSourceOver.msl +0 -31
- package/color/layer/differenceSourceOver.glsl +0 -30
- package/color/layer/differenceSourceOver.hlsl +0 -30
- package/color/layer/differenceSourceOver.msl +0 -31
- package/color/layer/exclusionSourceOver.glsl +0 -30
- package/color/layer/exclusionSourceOver.hlsl +0 -30
- package/color/layer/exclusionSourceOver.msl +0 -31
- package/color/layer/glowSourceOver.glsl +0 -30
- package/color/layer/glowSourceOver.hlsl +0 -30
- package/color/layer/glowSourceOver.msl +0 -31
- package/color/layer/hardLightSourceOver.glsl +0 -30
- package/color/layer/hardLightSourceOver.hlsl +0 -30
- package/color/layer/hardLightSourceOver.msl +0 -31
- package/color/layer/hardMixSourceOver.glsl +0 -30
- package/color/layer/hardMixSourceOver.hlsl +0 -30
- package/color/layer/hardMixSourceOver.msl +0 -31
- package/color/layer/hueSourceOver.glsl +0 -30
- package/color/layer/hueSourceOver.hlsl +0 -30
- package/color/layer/hueSourceOver.msl +0 -31
- package/color/layer/lightenSourceOver.glsl +0 -30
- package/color/layer/lightenSourceOver.hlsl +0 -30
- package/color/layer/lightenSourceOver.msl +0 -31
- package/color/layer/linearBurnSourceOver.glsl +0 -30
- package/color/layer/linearBurnSourceOver.hlsl +0 -30
- package/color/layer/linearBurnSourceOver.msl +0 -31
- package/color/layer/linearDodgeSourceOver.glsl +0 -30
- package/color/layer/linearDodgeSourceOver.hlsl +0 -30
- package/color/layer/linearDodgeSourceOver.msl +0 -31
- package/color/layer/linearLightSourceOver.glsl +0 -30
- package/color/layer/linearLightSourceOver.hlsl +0 -30
- package/color/layer/linearLightSourceOver.msl +0 -31
- package/color/layer/luminositySourceOver.glsl +0 -30
- package/color/layer/luminositySourceOver.hlsl +0 -30
- package/color/layer/luminositySourceOver.msl +0 -31
- package/color/layer/multiplySourceOver.glsl +0 -30
- package/color/layer/multiplySourceOver.hlsl +0 -30
- package/color/layer/multiplySourceOver.msl +0 -31
- package/color/layer/negationSourceOver.glsl +0 -30
- package/color/layer/negationSourceOver.hlsl +0 -30
- package/color/layer/negationSourceOver.msl +0 -31
- package/color/layer/overlaySourceOver.glsl +0 -30
- package/color/layer/overlaySourceOver.hlsl +0 -30
- package/color/layer/overlaySourceOver.msl +0 -31
- package/color/layer/phoenixSourceOver.glsl +0 -30
- package/color/layer/phoenixSourceOver.hlsl +0 -30
- package/color/layer/phoenixSourceOver.msl +0 -31
- package/color/layer/pinLightSourceOver.glsl +0 -30
- package/color/layer/pinLightSourceOver.hlsl +0 -30
- package/color/layer/pinLightSourceOver.msl +0 -31
- package/color/layer/reflectSourceOver.glsl +0 -30
- package/color/layer/reflectSourceOver.hlsl +0 -30
- package/color/layer/reflectSourceOver.msl +0 -31
- package/color/layer/saturationSourceOver.glsl +0 -30
- package/color/layer/saturationSourceOver.hlsl +0 -30
- package/color/layer/saturationSourceOver.msl +0 -31
- package/color/layer/screenSourceOver.glsl +0 -30
- package/color/layer/screenSourceOver.hlsl +0 -30
- package/color/layer/screenSourceOver.msl +0 -31
- package/color/layer/softLightSourceOver.glsl +0 -30
- package/color/layer/softLightSourceOver.hlsl +0 -30
- package/color/layer/softLightSourceOver.msl +0 -31
- package/color/layer/subtractSourceOver.glsl +0 -30
- package/color/layer/subtractSourceOver.hlsl +0 -30
- package/color/layer/subtractSourceOver.msl +0 -31
- package/color/layer/vividLightSourceOver.glsl +0 -30
- package/color/layer/vividLightSourceOver.hlsl +0 -30
- package/color/layer/vividLightSourceOver.msl +0 -31
- package/color/layer.glsl +0 -28
- package/color/layer.hlsl +0 -28
- package/color/layer.msl +0 -28
- package/color/levels/gamma.glsl +0 -19
- package/color/levels/gamma.hlsl +0 -30
- package/color/levels/gamma.msl +0 -19
- package/color/levels/inputRange.glsl +0 -18
- package/color/levels/inputRange.hlsl +0 -29
- package/color/levels/inputRange.msl +0 -18
- package/color/levels/outputRange.glsl +0 -18
- package/color/levels/outputRange.hlsl +0 -29
- package/color/levels/outputRange.msl +0 -18
- package/color/levels.glsl +0 -33
- package/color/levels.hlsl +0 -33
- package/color/levels.msl +0 -33
- package/color/luma.glsl +0 -14
- package/color/luma.hlsl +0 -22
- package/color/luma.msl +0 -14
- package/color/luma.wgsl +0 -11
- package/color/luminance.glsl +0 -16
- package/color/luminance.hlsl +0 -13
- package/color/luminance.msl +0 -14
- package/color/lut.glsl +0 -99
- package/color/lut.hlsl +0 -82
- package/color/lut.msl +0 -99
- package/color/mixBox.glsl +0 -121
- package/color/mixOklab.glsl +0 -51
- package/color/mixOklab.hlsl +0 -49
- package/color/mixOklab.msl +0 -51
- package/color/mixOklab.wgsl +0 -36
- package/color/mixRYB.glsl +0 -36
- package/color/mixRYB.hlsl +0 -36
- package/color/mixRYB.msl +0 -36
- package/color/mixSpectral.glsl +0 -168
- package/color/mixSpectral.hlsl +0 -156
- package/color/mixSpectral.msl +0 -168
- package/color/mixSpectral.wgsl +0 -208
- package/color/palette/fire.cuh +0 -17
- package/color/palette/fire.glsl +0 -15
- package/color/palette/fire.hlsl +0 -13
- package/color/palette/heatmap.cuh +0 -20
- package/color/palette/heatmap.glsl +0 -18
- package/color/palette/heatmap.hlsl +0 -16
- package/color/palette/heatmap.wgsl +0 -14
- package/color/palette/hue.cuh +0 -24
- package/color/palette/hue.glsl +0 -19
- package/color/palette/hue.hlsl +0 -20
- package/color/palette/hue.wgsl +0 -16
- package/color/palette/lerp.glsl +0 -60
- package/color/palette/macbeth.glsl +0 -1016
- package/color/palette/macbeth.hlsl +0 -957
- package/color/palette/pigments/gamblin_oil.glsl +0 -325
- package/color/palette/pigments/gamblin_oil.hlsl +0 -325
- package/color/palette/pigments/golden_acrylic.glsl +0 -248
- package/color/palette/pigments/golden_acrylic.hlsl +0 -248
- package/color/palette/pigments/liquitex_acrylic.glsl +0 -164
- package/color/palette/pigments/liquitex_acrylic.hlsl +0 -164
- package/color/palette/pigments/rembrandt_oil.glsl +0 -283
- package/color/palette/pigments/rembrandt_oil.hlsl +0 -283
- package/color/palette/pigments/winsor_acrylic.glsl +0 -430
- package/color/palette/pigments/winsor_acrylic.hlsl +0 -430
- package/color/palette/pigments/winsor_gouache.glsl +0 -346
- package/color/palette/pigments/winsor_gouache.hlsl +0 -346
- package/color/palette/pigments/winsor_oil.glsl +0 -507
- package/color/palette/pigments/winsor_oil.hlsl +0 -507
- package/color/palette/pigments.glsl +0 -88
- package/color/palette/pigments.hlsl +0 -88
- package/color/palette/ridgway.glsl +0 -7827
- package/color/palette/ridgway.hlsl +0 -7827
- package/color/palette/spectral/gems.glsl +0 -20
- package/color/palette/spectral/gems.hlsl +0 -20
- package/color/palette/spectral/geoffrey.glsl +0 -15
- package/color/palette/spectral/geoffrey.hlsl +0 -13
- package/color/palette/spectral/soft.glsl +0 -26
- package/color/palette/spectral/soft.hlsl +0 -25
- package/color/palette/spectral/zucconi.glsl +0 -26
- package/color/palette/spectral/zucconi.hlsl +0 -24
- package/color/palette/spectral/zucconi6.glsl +0 -30
- package/color/palette/spectral/zucconi6.hlsl +0 -28
- package/color/palette/spectral.glsl +0 -49
- package/color/palette/spectral.hlsl +0 -51
- package/color/palette/spyder.glsl +0 -690
- package/color/palette/spyder.hlsl +0 -680
- package/color/palette/wada/dyad.glsl +0 -156
- package/color/palette/wada/dyad.hlsl +0 -151
- package/color/palette/wada/tetrad.glsl +0 -132
- package/color/palette/wada/tetrad.hlsl +0 -127
- package/color/palette/wada/triad.glsl +0 -145
- package/color/palette/wada/triad.hlsl +0 -140
- package/color/palette/wada/value.glsl +0 -2397
- package/color/palette/wada/value.hlsl +0 -2387
- package/color/palette/wada.glsl +0 -4
- package/color/palette/wada.hlsl +0 -4
- package/color/palette/water.cuh +0 -21
- package/color/palette/water.glsl +0 -21
- package/color/palette/water.hlsl +0 -18
- package/color/palette/zorn.glsl +0 -39
- package/color/palette.glsl +0 -13
- package/color/palette.hlsl +0 -18
- package/color/palette.msl +0 -13
- package/color/saturationMatrix.glsl +0 -23
- package/color/saturationMatrix.hlsl +0 -30
- package/color/saturationMatrix.msl +0 -23
- package/color/saturationMatrix.wgsl +0 -15
- package/color/space/YCbCr2rgb.glsl +0 -25
- package/color/space/YCbCr2rgb.hlsl +0 -25
- package/color/space/YCbCr2rgb.msl +0 -25
- package/color/space/YCbCr2rgb.wgsl +0 -17
- package/color/space/YPbPr2rgb.glsl +0 -31
- package/color/space/YPbPr2rgb.hlsl +0 -31
- package/color/space/YPbPr2rgb.msl +0 -31
- package/color/space/YPbPr2rgb.wgsl +0 -21
- package/color/space/cmyk2rgb.glsl +0 -18
- package/color/space/cmyk2rgb.hlsl +0 -16
- package/color/space/cmyk2rgb.msl +0 -18
- package/color/space/cmyk2rgb.wgsl +0 -12
- package/color/space/gamma2linear.glsl +0 -37
- package/color/space/gamma2linear.hlsl +0 -37
- package/color/space/gamma2linear.msl +0 -37
- package/color/space/gamma2linear.wgsl +0 -11
- package/color/space/hcy2rgb.glsl +0 -26
- package/color/space/hcy2rgb.hlsl +0 -26
- package/color/space/hcy2rgb.msl +0 -26
- package/color/space/hcy2rgb.wgsl +0 -23
- package/color/space/hsl2rgb.glsl +0 -20
- package/color/space/hsl2rgb.hlsl +0 -20
- package/color/space/hsl2rgb.msl +0 -20
- package/color/space/hsl2rgb.wgsl +0 -16
- package/color/space/hsv2rgb.glsl +0 -14
- package/color/space/hsv2rgb.hlsl +0 -13
- package/color/space/hsv2rgb.msl +0 -14
- package/color/space/hsv2rgb.wgsl +0 -12
- package/color/space/hsv2ryb.glsl +0 -37
- package/color/space/hsv2ryb.hlsl +0 -37
- package/color/space/hsv2ryb.msl +0 -37
- package/color/space/hsv2ryb.wgsl +0 -19
- package/color/space/hue2rgb.glsl +0 -20
- package/color/space/hue2rgb.hlsl +0 -18
- package/color/space/hue2rgb.msl +0 -20
- package/color/space/hue2rgb.wgsl +0 -14
- package/color/space/k2rgb.glsl +0 -69
- package/color/space/k2rgb.hlsl +0 -67
- package/color/space/k2rgb.msl +0 -69
- package/color/space/k2rgb.wgsl +0 -26
- package/color/space/lab2lch.glsl +0 -20
- package/color/space/lab2lch.hlsl +0 -20
- package/color/space/lab2lch.msl +0 -20
- package/color/space/lab2lch.wgsl +0 -15
- package/color/space/lab2rgb.glsl +0 -18
- package/color/space/lab2rgb.hlsl +0 -17
- package/color/space/lab2rgb.msl +0 -18
- package/color/space/lab2rgb.wgsl +0 -14
- package/color/space/lab2srgb.glsl +0 -18
- package/color/space/lab2srgb.hlsl +0 -23
- package/color/space/lab2srgb.msl +0 -18
- package/color/space/lab2srgb.wgsl +0 -13
- package/color/space/lab2xyz.glsl +0 -33
- package/color/space/lab2xyz.hlsl +0 -36
- package/color/space/lab2xyz.msl +0 -33
- package/color/space/lab2xyz.wgsl +0 -17
- package/color/space/lch2lab.glsl +0 -20
- package/color/space/lch2lab.hlsl +0 -20
- package/color/space/lch2lab.msl +0 -20
- package/color/space/lch2lab.wgsl +0 -15
- package/color/space/lch2rgb.glsl +0 -16
- package/color/space/lch2rgb.hlsl +0 -16
- package/color/space/lch2rgb.msl +0 -16
- package/color/space/lch2rgb.wgsl +0 -13
- package/color/space/lch2srgb.glsl +0 -16
- package/color/space/lch2srgb.msl +0 -16
- package/color/space/linear2gamma.glsl +0 -37
- package/color/space/linear2gamma.hlsl +0 -38
- package/color/space/linear2gamma.msl +0 -37
- package/color/space/linear2gamma.wgsl +0 -11
- package/color/space/lms2rgb.glsl +0 -31
- package/color/space/lms2rgb.hlsl +0 -32
- package/color/space/lms2rgb.msl +0 -31
- package/color/space/lms2rgb.wgsl +0 -24
- package/color/space/oklab2rgb.glsl +0 -29
- package/color/space/oklab2rgb.hlsl +0 -29
- package/color/space/oklab2rgb.msl +0 -29
- package/color/space/oklab2rgb.wgsl +0 -21
- package/color/space/oklab2srgb.glsl +0 -16
- package/color/space/oklab2srgb.hlsl +0 -16
- package/color/space/oklab2srgb.msl +0 -16
- package/color/space/oklab2srgb.wgsl +0 -12
- package/color/space/rgb2YCbCr.glsl +0 -22
- package/color/space/rgb2YCbCr.hlsl +0 -22
- package/color/space/rgb2YCbCr.msl +0 -22
- package/color/space/rgb2YCbCr.wgsl +0 -14
- package/color/space/rgb2YPbPr.glsl +0 -31
- package/color/space/rgb2YPbPr.hlsl +0 -31
- package/color/space/rgb2YPbPr.msl +0 -31
- package/color/space/rgb2YPbPr.wgsl +0 -23
- package/color/space/rgb2cmyk.glsl +0 -22
- package/color/space/rgb2cmyk.hlsl +0 -21
- package/color/space/rgb2cmyk.msl +0 -22
- package/color/space/rgb2cmyk.wgsl +0 -15
- package/color/space/rgb2hcv.glsl +0 -24
- package/color/space/rgb2hcv.hlsl +0 -24
- package/color/space/rgb2hcv.msl +0 -24
- package/color/space/rgb2hcv.wgsl +0 -15
- package/color/space/rgb2hcy.glsl +0 -34
- package/color/space/rgb2hcy.hlsl +0 -33
- package/color/space/rgb2hcy.msl +0 -34
- package/color/space/rgb2hcy.wgsl +0 -29
- package/color/space/rgb2heat.glsl +0 -16
- package/color/space/rgb2heat.hlsl +0 -16
- package/color/space/rgb2heat.msl +0 -16
- package/color/space/rgb2heat.wgsl +0 -12
- package/color/space/rgb2hsl.glsl +0 -25
- package/color/space/rgb2hsl.hlsl +0 -25
- package/color/space/rgb2hsl.msl +0 -25
- package/color/space/rgb2hsl.wgsl +0 -17
- package/color/space/rgb2hsv.glsl +0 -23
- package/color/space/rgb2hsv.hlsl +0 -20
- package/color/space/rgb2hsv.msl +0 -23
- package/color/space/rgb2hsv.wgsl +0 -13
- package/color/space/rgb2hue.glsl +0 -27
- package/color/space/rgb2hue.hlsl +0 -24
- package/color/space/rgb2hue.msl +0 -27
- package/color/space/rgb2hue.wgsl +0 -17
- package/color/space/rgb2lab.glsl +0 -17
- package/color/space/rgb2lab.hlsl +0 -17
- package/color/space/rgb2lab.msl +0 -17
- package/color/space/rgb2lab.wgsl +0 -13
- package/color/space/rgb2lch.glsl +0 -17
- package/color/space/rgb2lch.hlsl +0 -17
- package/color/space/rgb2lch.msl +0 -17
- package/color/space/rgb2lch.wgsl +0 -13
- package/color/space/rgb2lms.glsl +0 -31
- package/color/space/rgb2lms.hlsl +0 -32
- package/color/space/rgb2lms.msl +0 -31
- package/color/space/rgb2lms.wgsl +0 -24
- package/color/space/rgb2luma.glsl +0 -14
- package/color/space/rgb2luma.hlsl +0 -14
- package/color/space/rgb2luma.msl +0 -14
- package/color/space/rgb2luma.wgsl +0 -9
- package/color/space/rgb2oklab.glsl +0 -31
- package/color/space/rgb2oklab.hlsl +0 -31
- package/color/space/rgb2oklab.msl +0 -31
- package/color/space/rgb2oklab.wgsl +0 -21
- package/color/space/rgb2ryb.glsl +0 -88
- package/color/space/rgb2ryb.hlsl +0 -88
- package/color/space/rgb2ryb.msl +0 -88
- package/color/space/rgb2ryb.wgsl +0 -32
- package/color/space/rgb2srgb.glsl +0 -23
- package/color/space/rgb2srgb.hlsl +0 -22
- package/color/space/rgb2srgb.msl +0 -23
- package/color/space/rgb2srgb.wgsl +0 -20
- package/color/space/rgb2xyY.glsl +0 -17
- package/color/space/rgb2xyY.hlsl +0 -17
- package/color/space/rgb2xyY.msl +0 -17
- package/color/space/rgb2xyY.wgsl +0 -12
- package/color/space/rgb2xyz.glsl +0 -29
- package/color/space/rgb2xyz.hlsl +0 -29
- package/color/space/rgb2xyz.msl +0 -29
- package/color/space/rgb2xyz.wgsl +0 -22
- package/color/space/rgb2yiq.glsl +0 -22
- package/color/space/rgb2yiq.hlsl +0 -22
- package/color/space/rgb2yiq.msl +0 -22
- package/color/space/rgb2yiq.wgsl +0 -14
- package/color/space/rgb2yuv.glsl +0 -31
- package/color/space/rgb2yuv.hlsl +0 -31
- package/color/space/rgb2yuv.msl +0 -31
- package/color/space/rgb2yuv.wgsl +0 -25
- package/color/space/ryb2rgb.glsl +0 -79
- package/color/space/ryb2rgb.hlsl +0 -79
- package/color/space/ryb2rgb.msl +0 -79
- package/color/space/ryb2rgb.wgsl +0 -30
- package/color/space/srgb2lab.glsl +0 -17
- package/color/space/srgb2lab.hlsl +0 -17
- package/color/space/srgb2lab.msl +0 -17
- package/color/space/srgb2lab.wgsl +0 -14
- package/color/space/srgb2lch.glsl +0 -17
- package/color/space/srgb2lch.hlsl +0 -17
- package/color/space/srgb2lch.msl +0 -17
- package/color/space/srgb2lch.wgsl +0 -13
- package/color/space/srgb2luma.glsl +0 -14
- package/color/space/srgb2luma.hlsl +0 -14
- package/color/space/srgb2luma.msl +0 -14
- package/color/space/srgb2luma.wgsl +0 -9
- package/color/space/srgb2oklab.glsl +0 -17
- package/color/space/srgb2oklab.hlsl +0 -16
- package/color/space/srgb2oklab.msl +0 -17
- package/color/space/srgb2oklab.wgsl +0 -12
- package/color/space/srgb2rgb.glsl +0 -23
- package/color/space/srgb2rgb.hlsl +0 -23
- package/color/space/srgb2rgb.msl +0 -23
- package/color/space/srgb2rgb.wgsl +0 -24
- package/color/space/srgb2xyz.glsl +0 -17
- package/color/space/srgb2xyz.hlsl +0 -17
- package/color/space/srgb2xyz.msl +0 -17
- package/color/space/srgb2xyz.wgsl +0 -13
- package/color/space/w2rgb.glsl +0 -53
- package/color/space/w2rgb.hlsl +0 -53
- package/color/space/w2rgb.msl +0 -53
- package/color/space/xyY2rgb.glsl +0 -17
- package/color/space/xyY2rgb.hlsl +0 -17
- package/color/space/xyY2rgb.msl +0 -17
- package/color/space/xyY2rgb.wgsl +0 -13
- package/color/space/xyY2srgb.glsl +0 -17
- package/color/space/xyY2srgb.hlsl +0 -17
- package/color/space/xyY2srgb.msl +0 -17
- package/color/space/xyY2srgb.wgsl +0 -13
- package/color/space/xyY2xyz.glsl +0 -20
- package/color/space/xyY2xyz.hlsl +0 -20
- package/color/space/xyY2xyz.msl +0 -20
- package/color/space/xyY2xyz.wgsl +0 -15
- package/color/space/xyz2lab.glsl +0 -23
- package/color/space/xyz2lab.hlsl +0 -23
- package/color/space/xyz2lab.msl +0 -23
- package/color/space/xyz2lab.wgsl +0 -17
- package/color/space/xyz2rgb.glsl +0 -32
- package/color/space/xyz2rgb.hlsl +0 -32
- package/color/space/xyz2rgb.msl +0 -32
- package/color/space/xyz2rgb.wgsl +0 -13
- package/color/space/xyz2srgb.glsl +0 -17
- package/color/space/xyz2srgb.hlsl +0 -17
- package/color/space/xyz2srgb.msl +0 -17
- package/color/space/xyz2srgb.wgsl +0 -13
- package/color/space/xyz2xyY.glsl +0 -20
- package/color/space/xyz2xyY.hlsl +0 -20
- package/color/space/xyz2xyY.msl +0 -20
- package/color/space/xyz2xyY.wgsl +0 -15
- package/color/space/yiq2rgb.glsl +0 -21
- package/color/space/yiq2rgb.hlsl +0 -21
- package/color/space/yiq2rgb.msl +0 -21
- package/color/space/yiq2rgb.wgsl +0 -13
- package/color/space/yuv2rgb.glsl +0 -31
- package/color/space/yuv2rgb.hlsl +0 -31
- package/color/space/yuv2rgb.msl +0 -31
- package/color/space/yuv2rgb.wgsl +0 -24
- package/color/space.glsl +0 -57
- package/color/space.hlsl +0 -27
- package/color/space.msl +0 -57
- package/color/tonemap/aces.glsl +0 -23
- package/color/tonemap/aces.hlsl +0 -21
- package/color/tonemap/aces.wgsl +0 -19
- package/color/tonemap/debug.glsl +0 -68
- package/color/tonemap/debug.hlsl +0 -69
- package/color/tonemap/filmic.glsl +0 -16
- package/color/tonemap/filmic.hlsl +0 -20
- package/color/tonemap/filmic.wgsl +0 -17
- package/color/tonemap/linear.glsl +0 -11
- package/color/tonemap/linear.hlsl +0 -12
- package/color/tonemap/reinhard.glsl +0 -11
- package/color/tonemap/reinhard.hlsl +0 -13
- package/color/tonemap/reinhardJodie.glsl +0 -15
- package/color/tonemap/reinhardJodie.hlsl +0 -18
- package/color/tonemap/uncharted.glsl +0 -29
- package/color/tonemap/uncharted.hlsl +0 -29
- package/color/tonemap/uncharted.wgsl +0 -25
- package/color/tonemap/uncharted2.glsl +0 -24
- package/color/tonemap/uncharted2.hlsl +0 -24
- package/color/tonemap/uncharted2.wgsl +0 -21
- package/color/tonemap/unreal.glsl +0 -11
- package/color/tonemap/unreal.hlsl +0 -11
- package/color/tonemap.glsl +0 -46
- package/color/tonemap.hlsl +0 -52
- package/color/tonemap.msl +0 -46
- package/color/vibrance.glsl +0 -25
- package/color/vibrance.hlsl +0 -27
- package/color/vibrance.msl +0 -25
- package/color/vibrance.wgsl +0 -19
- package/color/whiteBalance.glsl +0 -83
- package/color/whiteBalance.hlsl +0 -86
- package/color/whiteBalance.msl +0 -83
- package/color/whiteBalance.wgsl +0 -64
- package/distort/barrel.glsl +0 -75
- package/distort/barrel.hlsl +0 -73
- package/distort/barrel.msl +0 -75
- package/distort/chromaAB.glsl +0 -79
- package/distort/chromaAB.hlsl +0 -78
- package/distort/chromaAB.msl +0 -79
- package/distort/grain.glsl +0 -81
- package/distort/grain.hlsl +0 -69
- package/distort/grain.msl +0 -81
- package/distort/pincushion.glsl +0 -53
- package/distort/pincushion.msl +0 -53
- package/distort/stretch.glsl +0 -68
- package/distort/stretch.hlsl +0 -68
- package/distort/stretch.msl +0 -68
- package/draw/arrows.glsl +0 -106
- package/draw/arrows.msl +0 -106
- package/draw/axis.glsl +0 -43
- package/draw/axis.hlsl +0 -43
- package/draw/bridge.glsl +0 -34
- package/draw/bridge.hlsl +0 -34
- package/draw/bridge.msl +0 -34
- package/draw/circle.glsl +0 -25
- package/draw/circle.hlsl +0 -25
- package/draw/circle.msl +0 -25
- package/draw/colorChecker.glsl +0 -136
- package/draw/colorChecker.msl +0 -136
- package/draw/colorPicker.glsl +0 -65
- package/draw/colorPicker.hlsl +0 -65
- package/draw/colorPicker.msl +0 -65
- package/draw/digits.glsl +0 -204
- package/draw/digits.hlsl +0 -199
- package/draw/digits.msl +0 -205
- package/draw/fill.glsl +0 -23
- package/draw/fill.hlsl +0 -21
- package/draw/fill.msl +0 -23
- package/draw/flip.glsl +0 -23
- package/draw/flip.hlsl +0 -15
- package/draw/flip.msl +0 -23
- package/draw/hex.glsl +0 -25
- package/draw/hex.hlsl +0 -25
- package/draw/hex.msl +0 -25
- package/draw/line.glsl +0 -21
- package/draw/line.hlsl +0 -21
- package/draw/matrix.glsl +0 -43
- package/draw/matrix.hlsl +0 -43
- package/draw/matrix.msl +0 -43
- package/draw/point.glsl +0 -59
- package/draw/point.hlsl +0 -59
- package/draw/point.msl +0 -59
- package/draw/rect.glsl +0 -35
- package/draw/rect.hlsl +0 -25
- package/draw/rect.msl +0 -35
- package/draw/stroke.glsl +0 -26
- package/draw/stroke.hlsl +0 -25
- package/draw/stroke.msl +0 -26
- package/draw/stroke.wgsl +0 -12
- package/draw/tri.glsl +0 -25
- package/draw/tri.hlsl +0 -25
- package/draw/tri.msl +0 -25
- package/filter/bilateral.glsl +0 -87
- package/filter/bilateral.hlsl +0 -73
- package/filter/bilinear.glsl +0 -45
- package/filter/boxBlur/1D.glsl +0 -63
- package/filter/boxBlur/1D.hlsl +0 -50
- package/filter/boxBlur/1D.msl +0 -63
- package/filter/boxBlur/2D.glsl +0 -75
- package/filter/boxBlur/2D.hlsl +0 -63
- package/filter/boxBlur/2D.msl +0 -75
- package/filter/boxBlur/2D_fast9.glsl +0 -48
- package/filter/boxBlur/2D_fast9.hlsl +0 -46
- package/filter/boxBlur/2D_fast9.msl +0 -48
- package/filter/boxBlur.glsl +0 -78
- package/filter/boxBlur.hlsl +0 -73
- package/filter/boxBlur.msl +0 -78
- package/filter/edge/prewitt.glsl +0 -47
- package/filter/edge/prewitt.hlsl +0 -45
- package/filter/edge/prewitt.wgsl +0 -25
- package/filter/edge/sobel.glsl +0 -48
- package/filter/edge/sobel.hlsl +0 -46
- package/filter/edge/sobelDirectional.glsl +0 -43
- package/filter/edge/sobelDirectional.hlsl +0 -41
- package/filter/edge.glsl +0 -41
- package/filter/edge.hlsl +0 -38
- package/filter/fibonacciBokeh.glsl +0 -59
- package/filter/gaussianBlur/1D.glsl +0 -76
- package/filter/gaussianBlur/1D.hlsl +0 -53
- package/filter/gaussianBlur/1D.msl +0 -76
- package/filter/gaussianBlur/1D_fast13.glsl +0 -46
- package/filter/gaussianBlur/1D_fast13.hlsl +0 -45
- package/filter/gaussianBlur/1D_fast13.msl +0 -46
- package/filter/gaussianBlur/1D_fast5.glsl +0 -39
- package/filter/gaussianBlur/1D_fast5.hlsl +0 -38
- package/filter/gaussianBlur/1D_fast5.msl +0 -39
- package/filter/gaussianBlur/1D_fast9.glsl +0 -42
- package/filter/gaussianBlur/1D_fast9.hlsl +0 -41
- package/filter/gaussianBlur/1D_fast9.msl +0 -42
- package/filter/gaussianBlur/2D.glsl +0 -77
- package/filter/gaussianBlur/2D.hlsl +0 -64
- package/filter/gaussianBlur/2D.msl +0 -77
- package/filter/gaussianBlur.glsl +0 -75
- package/filter/gaussianBlur.hlsl +0 -73
- package/filter/gaussianBlur.msl +0 -75
- package/filter/jointBilateral.glsl +0 -100
- package/filter/kuwahara.glsl +0 -220
- package/filter/kuwahara.hlsl +0 -124
- package/filter/laplacian.glsl +0 -167
- package/filter/laplacian.hlsl +0 -165
- package/filter/mean.glsl +0 -38
- package/filter/mean.hlsl +0 -38
- package/filter/median/2D_fast3.glsl +0 -67
- package/filter/median/2D_fast3.hlsl +0 -65
- package/filter/median/2D_fast5.glsl +0 -83
- package/filter/median/2D_fast5.hlsl +0 -81
- package/filter/median.glsl +0 -50
- package/filter/median.hlsl +0 -48
- package/filter/noiseBlur.glsl +0 -98
- package/filter/noiseBlur.hlsl +0 -90
- package/filter/radialBlur.glsl +0 -52
- package/filter/radialBlur.hlsl +0 -50
- package/filter/sharpen/adaptive.glsl +0 -288
- package/filter/sharpen/adaptive.hlsl +0 -286
- package/filter/sharpen/adaptive.wgsl +0 -288
- package/filter/sharpen/contrastAdaptive.glsl +0 -85
- package/filter/sharpen/contrastAdaptive.hlsl +0 -84
- package/filter/sharpen/fast.glsl +0 -66
- package/filter/sharpen/fast.hlsl +0 -66
- package/filter/sharpen/fast.wgsl +0 -32
- package/filter/sharpen.glsl +0 -49
- package/filter/sharpen.hlsl +0 -49
- package/filter/smartDeNoise.glsl +0 -69
- package/generative/cnoise.glsl +0 -259
- package/generative/cnoise.hlsl +0 -257
- package/generative/cnoise.msl +0 -259
- package/generative/cnoise.wgsl +0 -253
- package/generative/curl.glsl +0 -101
- package/generative/curl.hlsl +0 -72
- package/generative/curl.msl +0 -101
- package/generative/fbm.glsl +0 -115
- package/generative/fbm.hlsl +0 -85
- package/generative/fbm.msl +0 -115
- package/generative/gerstnerWave.glsl +0 -55
- package/generative/gerstnerWave.hlsl +0 -55
- package/generative/gerstnerWave.msl +0 -55
- package/generative/gnoise.glsl +0 -73
- package/generative/gnoise.msl +0 -73
- package/generative/noised.glsl +0 -84
- package/generative/noised.hlsl +0 -82
- package/generative/noised.msl +0 -84
- package/generative/noised.wgsl +0 -72
- package/generative/pnoise.glsl +0 -260
- package/generative/pnoise.hlsl +0 -258
- package/generative/pnoise.msl +0 -261
- package/generative/pnoise.wgsl +0 -254
- package/generative/psrdnoise.glsl +0 -647
- package/generative/psrdnoise.hlsl +0 -652
- package/generative/psrdnoise.msl +0 -649
- package/generative/random.glsl +0 -126
- package/generative/random.hlsl +0 -148
- package/generative/random.msl +0 -126
- package/generative/random.wgsl +0 -127
- package/generative/snoise.glsl +0 -239
- package/generative/snoise.hlsl +0 -236
- package/generative/snoise.msl +0 -240
- package/generative/snoise.wgsl +0 -225
- package/generative/srandom.glsl +0 -53
- package/generative/srandom.hlsl +0 -26
- package/generative/srandom.msl +0 -53
- package/generative/srandom.wgsl +0 -60
- package/generative/voronoi.glsl +0 -46
- package/generative/voronoi.hlsl +0 -44
- package/generative/voronoi.msl +0 -45
- package/generative/voronoise.glsl +0 -77
- package/generative/voronoise.hlsl +0 -56
- package/generative/voronoise.msl +0 -77
- package/generative/wavelet.glsl +0 -52
- package/generative/wavelet.msl +0 -50
- package/generative/wavelet.wgsl +0 -51
- package/generative/worley.glsl +0 -105
- package/generative/worley.hlsl +0 -105
- package/generative/worley.msl +0 -52
- package/generative/worley.wgsl +0 -95
- package/geometry/aabb/aabb.cuh +0 -15
- package/geometry/aabb/aabb.glsl +0 -15
- package/geometry/aabb/aabb.hlsl +0 -17
- package/geometry/aabb/centroid.cuh +0 -16
- package/geometry/aabb/centroid.glsl +0 -15
- package/geometry/aabb/centroid.hlsl +0 -15
- package/geometry/aabb/contain.cuh +0 -22
- package/geometry/aabb/contain.glsl +0 -21
- package/geometry/aabb/contain.hlsl +0 -22
- package/geometry/aabb/diagonal.cuh +0 -20
- package/geometry/aabb/diagonal.glsl +0 -18
- package/geometry/aabb/diagonal.hlsl +0 -18
- package/geometry/aabb/expand.cuh +0 -37
- package/geometry/aabb/expand.glsl +0 -31
- package/geometry/aabb/expand.hlsl +0 -31
- package/geometry/aabb/intersect.cuh +0 -30
- package/geometry/aabb/intersect.glsl +0 -35
- package/geometry/aabb/intersect.hlsl +0 -34
- package/geometry/aabb/intersection.cuh +0 -25
- package/geometry/aabb/square.cuh +0 -23
- package/geometry/aabb/square.glsl +0 -23
- package/geometry/aabb/square.hlsl +0 -23
- package/geometry/aabb.cuh +0 -6
- package/geometry/aabb.glsl +0 -6
- package/geometry/aabb.hlsl +0 -6
- package/geometry/triangle/area.cuh +0 -18
- package/geometry/triangle/area.glsl +0 -15
- package/geometry/triangle/area.hlsl +0 -15
- package/geometry/triangle/barycentric.cuh +0 -44
- package/geometry/triangle/barycentric.glsl +0 -42
- package/geometry/triangle/barycentric.hlsl +0 -42
- package/geometry/triangle/centroid.cuh +0 -18
- package/geometry/triangle/centroid.glsl +0 -17
- package/geometry/triangle/centroid.hlsl +0 -17
- package/geometry/triangle/closestPoint.cuh +0 -82
- package/geometry/triangle/closestPoint.glsl +0 -81
- package/geometry/triangle/closestPoint.hlsl +0 -81
- package/geometry/triangle/contain.cuh +0 -40
- package/geometry/triangle/contain.glsl +0 -38
- package/geometry/triangle/contain.hlsl +0 -38
- package/geometry/triangle/distanceSq.cuh +0 -40
- package/geometry/triangle/distanceSq.glsl +0 -36
- package/geometry/triangle/distanceSq.hlsl +0 -35
- package/geometry/triangle/intersect.cuh +0 -39
- package/geometry/triangle/intersect.glsl +0 -35
- package/geometry/triangle/intersect.hlsl +0 -35
- package/geometry/triangle/normal.cuh +0 -20
- package/geometry/triangle/normal.glsl +0 -17
- package/geometry/triangle/normal.hlsl +0 -16
- package/geometry/triangle/signedDistance.cuh +0 -27
- package/geometry/triangle/signedDistance.glsl +0 -24
- package/geometry/triangle/signedDistance.hlsl +0 -24
- package/geometry/triangle/triangle.cuh +0 -14
- package/geometry/triangle/triangle.glsl +0 -14
- package/geometry/triangle/triangle.hlsl +0 -14
- package/geometry/triangle.cuh +0 -9
- package/geometry/triangle.glsl +0 -9
- package/geometry/triangle.hlsl +0 -9
- package/lighting/atmosphere.glsl +0 -213
- package/lighting/atmosphere.hlsl +0 -218
- package/lighting/blackbody.glsl +0 -15
- package/lighting/blackbody.hlsl +0 -15
- package/lighting/camera.cuh +0 -21
- package/lighting/camera.glsl +0 -21
- package/lighting/camera.hlsl +0 -21
- package/lighting/common/ashikhmin.glsl +0 -14
- package/lighting/common/ashikhmin.hlsl +0 -14
- package/lighting/common/beckmann.glsl +0 -15
- package/lighting/common/beckmann.hlsl +0 -11
- package/lighting/common/charlie.glsl +0 -12
- package/lighting/common/charlie.hlsl +0 -12
- package/lighting/common/clampNoV.glsl +0 -11
- package/lighting/common/clampNoV.hlsl +0 -11
- package/lighting/common/envBRDFApprox.glsl +0 -23
- package/lighting/common/envBRDFApprox.hlsl +0 -23
- package/lighting/common/ggx.glsl +0 -52
- package/lighting/common/ggx.hlsl +0 -48
- package/lighting/common/ggx.wgsl +0 -11
- package/lighting/common/gtaoMultiBounce.glsl +0 -22
- package/lighting/common/gtaoMultiBounce.hlsl +0 -22
- package/lighting/common/henyeyGreenstein.glsl +0 -25
- package/lighting/common/henyeyGreenstein.hlsl +0 -25
- package/lighting/common/kelemen.glsl +0 -12
- package/lighting/common/kelemen.hlsl +0 -12
- package/lighting/common/penner.glsl +0 -28
- package/lighting/common/perceptual2linearRoughness.glsl +0 -20
- package/lighting/common/perceptual2linearRoughness.hlsl +0 -20
- package/lighting/common/preFilteredImportanceSampling.glsl +0 -11
- package/lighting/common/preFilteredImportanceSampling.hlsl +0 -11
- package/lighting/common/rayleigh.glsl +0 -11
- package/lighting/common/rayleigh.hlsl +0 -11
- package/lighting/common/schlick.glsl +0 -20
- package/lighting/common/schlick.hlsl +0 -20
- package/lighting/common/schlick.wgsl +0 -3
- package/lighting/common/smithGGXCorrelated.glsl +0 -26
- package/lighting/common/smithGGXCorrelated.hlsl +0 -26
- package/lighting/common/specularAO.glsl +0 -20
- package/lighting/common/specularAO.hlsl +0 -18
- package/lighting/debugCube.glsl +0 -19
- package/lighting/debugCube.hlsl +0 -19
- package/lighting/diffuse/burley.glsl +0 -30
- package/lighting/diffuse/burley.hlsl +0 -30
- package/lighting/diffuse/lambert.glsl +0 -22
- package/lighting/diffuse/lambert.hlsl +0 -22
- package/lighting/diffuse/orenNayar.glsl +0 -32
- package/lighting/diffuse/orenNayar.hlsl +0 -32
- package/lighting/diffuse/orenNayar.wgsl +0 -20
- package/lighting/diffuse.glsl +0 -28
- package/lighting/diffuse.hlsl +0 -27
- package/lighting/envMap.glsl +0 -81
- package/lighting/envMap.hlsl +0 -72
- package/lighting/exposure.glsl +0 -16
- package/lighting/exposure.hlsl +0 -16
- package/lighting/fakeCube.glsl +0 -82
- package/lighting/fakeCube.hlsl +0 -26
- package/lighting/fresnel.glsl +0 -45
- package/lighting/fresnel.hlsl +0 -46
- package/lighting/fresnel.wgsl +0 -13
- package/lighting/fresnelReflection.glsl +0 -106
- package/lighting/fresnelReflection.hlsl +0 -114
- package/lighting/fresnelReflection.wgsl +0 -26
- package/lighting/gooch.glsl +0 -105
- package/lighting/gooch.hlsl +0 -120
- package/lighting/ior/2eta.glsl +0 -15
- package/lighting/ior/2eta.hlsl +0 -15
- package/lighting/ior/2f0.glsl +0 -17
- package/lighting/ior/2f0.hlsl +0 -17
- package/lighting/ior/reflectance2f0.glsl +0 -11
- package/lighting/ior/reflectance2f0.hlsl +0 -11
- package/lighting/ior.glsl +0 -58
- package/lighting/ior.hlsl +0 -59
- package/lighting/iridescence.glsl +0 -51
- package/lighting/iridescence.hlsl +0 -49
- package/lighting/light/attenuation.glsl +0 -34
- package/lighting/light/attenuation.hlsl +0 -34
- package/lighting/light/directional.glsl +0 -16
- package/lighting/light/directional.hlsl +0 -16
- package/lighting/light/directionalEvaluate.glsl +0 -52
- package/lighting/light/directionalEvaluate.hlsl +0 -52
- package/lighting/light/falloff.glsl +0 -20
- package/lighting/light/falloff.hlsl +0 -20
- package/lighting/light/iblEvaluate.glsl +0 -73
- package/lighting/light/iblEvaluate.hlsl +0 -68
- package/lighting/light/new.glsl +0 -77
- package/lighting/light/new.hlsl +0 -77
- package/lighting/light/point.glsl +0 -17
- package/lighting/light/point.hlsl +0 -17
- package/lighting/light/pointEvaluate.glsl +0 -60
- package/lighting/light/pointEvaluate.hlsl +0 -60
- package/lighting/light/resolve.glsl +0 -19
- package/lighting/light/resolve.hlsl +0 -19
- package/lighting/light/spot.glsl +0 -60
- package/lighting/light/spot.hlsl +0 -69
- package/lighting/material/add.glsl +0 -47
- package/lighting/material/add.hlsl +0 -48
- package/lighting/material/albedo.glsl +0 -64
- package/lighting/material/albedo.hlsl +0 -64
- package/lighting/material/emissive.glsl +0 -42
- package/lighting/material/emissive.hlsl +0 -43
- package/lighting/material/metallic.glsl +0 -67
- package/lighting/material/metallic.hlsl +0 -68
- package/lighting/material/multiply.glsl +0 -42
- package/lighting/material/multiply.hlsl +0 -42
- package/lighting/material/new.glsl +0 -145
- package/lighting/material/new.hlsl +0 -147
- package/lighting/material/normal.glsl +0 -57
- package/lighting/material/normal.hlsl +0 -56
- package/lighting/material/occlusion.glsl +0 -44
- package/lighting/material/occlusion.hlsl +0 -44
- package/lighting/material/roughness.glsl +0 -60
- package/lighting/material/roughness.hlsl +0 -60
- package/lighting/material/shininess.glsl +0 -30
- package/lighting/material/shininess.hlsl +0 -32
- package/lighting/material/specular.glsl +0 -39
- package/lighting/material/specular.hlsl +0 -39
- package/lighting/material/zero.glsl +0 -69
- package/lighting/material/zero.hlsl +0 -69
- package/lighting/material.glsl +0 -78
- package/lighting/material.hlsl +0 -79
- package/lighting/medium/new.glsl +0 -41
- package/lighting/medium/new.hlsl +0 -41
- package/lighting/medium.glsl +0 -16
- package/lighting/medium.hlsl +0 -16
- package/lighting/pbr.glsl +0 -93
- package/lighting/pbr.hlsl +0 -92
- package/lighting/pbrClearCoat.glsl +0 -177
- package/lighting/pbrClearCoat.hlsl +0 -176
- package/lighting/pbrGlass.glsl +0 -116
- package/lighting/pbrGlass.hlsl +0 -118
- package/lighting/pbrLittle.glsl +0 -100
- package/lighting/pbrLittle.hlsl +0 -99
- package/lighting/ray/cast.glsl +0 -19
- package/lighting/ray/direction.glsl +0 -44
- package/lighting/ray/new.glsl +0 -54
- package/lighting/ray.cuh +0 -15
- package/lighting/ray.glsl +0 -15
- package/lighting/ray.hlsl +0 -15
- package/lighting/raymarch/ao.cuh +0 -38
- package/lighting/raymarch/ao.glsl +0 -48
- package/lighting/raymarch/ao.hlsl +0 -47
- package/lighting/raymarch/cast.cuh +0 -58
- package/lighting/raymarch/cast.glsl +0 -53
- package/lighting/raymarch/cast.hlsl +0 -53
- package/lighting/raymarch/cast.wgsl +0 -20
- package/lighting/raymarch/fog.glsl +0 -71
- package/lighting/raymarch/fog.hlsl +0 -75
- package/lighting/raymarch/glass.glsl +0 -302
- package/lighting/raymarch/glass.hlsl +0 -300
- package/lighting/raymarch/map.cuh +0 -24
- package/lighting/raymarch/map.glsl +0 -26
- package/lighting/raymarch/map.hlsl +0 -24
- package/lighting/raymarch/normal.cuh +0 -51
- package/lighting/raymarch/normal.glsl +0 -38
- package/lighting/raymarch/normal.hlsl +0 -36
- package/lighting/raymarch/normal.wgsl +0 -21
- package/lighting/raymarch/render.glsl +0 -62
- package/lighting/raymarch/render.hlsl +0 -61
- package/lighting/raymarch/shading.glsl +0 -83
- package/lighting/raymarch/shading.hlsl +0 -80
- package/lighting/raymarch/softShadow.cuh +0 -51
- package/lighting/raymarch/softShadow.glsl +0 -60
- package/lighting/raymarch/softShadow.hlsl +0 -56
- package/lighting/raymarch/volume.glsl +0 -137
- package/lighting/raymarch/volume.hlsl +0 -137
- package/lighting/raymarch.glsl +0 -145
- package/lighting/raymarch.hlsl +0 -145
- package/lighting/reflection.glsl +0 -43
- package/lighting/reflection.hlsl +0 -40
- package/lighting/shadingData/new.glsl +0 -55
- package/lighting/shadingData/new.hlsl +0 -55
- package/lighting/shadingData/shadingData.glsl +0 -34
- package/lighting/shadingData/shadingData.hlsl +0 -34
- package/lighting/shadow.glsl +0 -41
- package/lighting/shadow.hlsl +0 -34
- package/lighting/specular/beckmann.glsl +0 -10
- package/lighting/specular/beckmann.hlsl +0 -10
- package/lighting/specular/blinnPhong.glsl +0 -28
- package/lighting/specular/blinnPhong.hlsl +0 -28
- package/lighting/specular/cookTorrance.glsl +0 -31
- package/lighting/specular/cookTorrance.hlsl +0 -29
- package/lighting/specular/cookTorrance.wgsl +0 -22
- package/lighting/specular/gaussian.glsl +0 -15
- package/lighting/specular/gaussian.hlsl +0 -15
- package/lighting/specular/importanceSampling.glsl +0 -69
- package/lighting/specular/importanceSampling.hlsl +0 -75
- package/lighting/specular/phong.glsl +0 -29
- package/lighting/specular/phong.hlsl +0 -29
- package/lighting/specular/ward.glsl +0 -26
- package/lighting/specular/ward.hlsl +0 -26
- package/lighting/specular.glsl +0 -32
- package/lighting/specular.hlsl +0 -31
- package/lighting/sphereMap.glsl +0 -34
- package/lighting/sphereMap.hlsl +0 -33
- package/lighting/sphericalHarmonics.glsl +0 -60
- package/lighting/sphericalHarmonics.hlsl +0 -54
- package/lighting/ssao.glsl +0 -154
- package/lighting/ssr.glsl +0 -138
- package/lighting/toMetallic.glsl +0 -36
- package/lighting/toMetallic.hlsl +0 -35
- package/lighting/toShininess.glsl +0 -18
- package/lighting/toShininess.hlsl +0 -20
- package/lighting/toShininess.wgsl +0 -14
- package/lighting/transparent.glsl +0 -99
- package/lighting/transparent.hlsl +0 -99
- package/lighting/volumetricLightScattering.glsl +0 -140
- package/lighting/wavelength.glsl +0 -15
- package/lighting/wavelength.hlsl +0 -15
- package/math/aafloor.glsl +0 -39
- package/math/aafloor.hlsl +0 -28
- package/math/aafloor.msl +0 -34
- package/math/aafloor.wgsl +0 -18
- package/math/aafract.glsl +0 -40
- package/math/aafract.hlsl +0 -30
- package/math/aafract.msl +0 -33
- package/math/aafract.wgsl +0 -17
- package/math/aamirror.glsl +0 -24
- package/math/aamirror.hlsl +0 -24
- package/math/aastep.glsl +0 -29
- package/math/aastep.hlsl +0 -20
- package/math/aastep.msl +0 -23
- package/math/aastep.wgsl +0 -9
- package/math/abs.cuh +0 -24
- package/math/absi.glsl +0 -13
- package/math/absi.msl +0 -13
- package/math/adaptiveThreshold.cuh +0 -18
- package/math/adaptiveThreshold.glsl +0 -16
- package/math/adaptiveThreshold.hlsl +0 -16
- package/math/adaptiveThreshold.msl +0 -16
- package/math/adaptiveThreshold.wgsl +0 -6
- package/math/asin.cuh +0 -17
- package/math/atan2.glsl +0 -15
- package/math/atan2.msl +0 -15
- package/math/bump.cuh +0 -22
- package/math/bump.glsl +0 -22
- package/math/bump.hlsl +0 -18
- package/math/bump.msl +0 -22
- package/math/bump.wgsl +0 -12
- package/math/clamp.cuh +0 -53
- package/math/const.cuh +0 -39
- package/math/const.glsl +0 -55
- package/math/const.hlsl +0 -55
- package/math/const.msl +0 -55
- package/math/const.wgsl +0 -23
- package/math/cross.cuh +0 -17
- package/math/cubic.cuh +0 -51
- package/math/cubic.glsl +0 -51
- package/math/cubic.hlsl +0 -49
- package/math/cubic.msl +0 -51
- package/math/cubic.wgsl +0 -9
- package/math/cubicMix.glsl +0 -20
- package/math/cubicMix.hlsl +0 -20
- package/math/cubicMix.msl +0 -20
- package/math/cubicMix.wgsl +0 -14
- package/math/decimate.cuh +0 -16
- package/math/decimate.glsl +0 -21
- package/math/decimate.hlsl +0 -19
- package/math/decimate.msl +0 -21
- package/math/decimate.wgsl +0 -12
- package/math/dist.glsl +0 -44
- package/math/dist.hlsl +0 -64
- package/math/dist.wgsl +0 -34
- package/math/dot.cuh +0 -25
- package/math/equal.msl +0 -17
- package/math/fcos.glsl +0 -17
- package/math/fcos.hlsl +0 -17
- package/math/floor.cuh +0 -17
- package/math/frac.cuh +0 -18
- package/math/frac.glsl +0 -13
- package/math/frac.msl +0 -13
- package/math/fract.cuh +0 -18
- package/math/fract.hlsl +0 -13
- package/math/gain.cuh +0 -16
- package/math/gain.glsl +0 -16
- package/math/gain.hlsl +0 -14
- package/math/gain.msl +0 -16
- package/math/gain.wgsl +0 -10
- package/math/gaussian.cuh +0 -18
- package/math/gaussian.glsl +0 -18
- package/math/gaussian.hlsl +0 -18
- package/math/gaussian.msl +0 -18
- package/math/gaussian.msl 2 +0 -18
- package/math/gaussian.wgsl +0 -12
- package/math/grad4.cuh +0 -37
- package/math/grad4.glsl +0 -18
- package/math/grad4.hlsl +0 -23
- package/math/grad4.msl +0 -20
- package/math/grad4.wgsl +0 -13
- package/math/greaterThan.cuh +0 -15
- package/math/greaterThan.hlsl +0 -13
- package/math/greaterThan.msl +0 -17
- package/math/greaterThanEqual.msl +0 -17
- package/math/hammersley.glsl +0 -32
- package/math/hammersley.hlsl +0 -32
- package/math/highPass.cuh +0 -13
- package/math/highPass.glsl +0 -13
- package/math/highPass.hlsl +0 -13
- package/math/highPass.msl +0 -13
- package/math/highPass.wgsl +0 -9
- package/math/inside.glsl +0 -39
- package/math/inside.hlsl +0 -39
- package/math/inside.msl +0 -39
- package/math/inside.wgsl +0 -22
- package/math/invCubic.cuh +0 -17
- package/math/invCubic.glsl +0 -15
- package/math/invCubic.hlsl +0 -13
- package/math/invCubic.msl +0 -15
- package/math/invCubic.wgsl +0 -9
- package/math/invQuartic.cuh +0 -16
- package/math/invQuartic.glsl +0 -15
- package/math/invQuartic.hlsl +0 -13
- package/math/invQuartic.msl +0 -15
- package/math/invQuartic.wgsl +0 -9
- package/math/inverse.glsl +0 -78
- package/math/inverse.msl +0 -74
- package/math/inverse.wgsl +0 -28
- package/math/length.cuh +0 -19
- package/math/lengthSq.cuh +0 -19
- package/math/lengthSq.glsl +0 -17
- package/math/lengthSq.hlsl +0 -17
- package/math/lengthSq.msl +0 -17
- package/math/lengthSq.wgsl +0 -11
- package/math/lerp.cuh +0 -25
- package/math/lerp.glsl +0 -13
- package/math/lerp.msl +0 -13
- package/math/lessThan.msl +0 -17
- package/math/lessThanEqual.msl +0 -17
- package/math/make.cuh +0 -108
- package/math/map.cuh +0 -37
- package/math/map.glsl +0 -23
- package/math/map.hlsl +0 -34
- package/math/map.msl +0 -23
- package/math/map.wgsl +0 -13
- package/math/max.cuh +0 -33
- package/math/min.cuh +0 -33
- package/math/mirror.cuh +0 -26
- package/math/mirror.glsl +0 -24
- package/math/mirror.hlsl +0 -24
- package/math/mirror.msl +0 -24
- package/math/mirror.wgsl +0 -18
- package/math/mix.cuh +0 -25
- package/math/mix.hlsl +0 -64
- package/math/mmax.cuh +0 -25
- package/math/mmax.glsl +0 -22
- package/math/mmax.hlsl +0 -23
- package/math/mmax.msl +0 -22
- package/math/mmax.wgsl +0 -11
- package/math/mmin .wgsl +0 -11
- package/math/mmin.cuh +0 -25
- package/math/mmin.glsl +0 -24
- package/math/mmin.hlsl +0 -23
- package/math/mmin.msl +0 -24
- package/math/mmix.glsl +0 -167
- package/math/mmix.msl +0 -167
- package/math/mod.cuh +0 -27
- package/math/mod.hlsl +0 -18
- package/math/mod.msl +0 -26
- package/math/mod.wgsl +0 -11
- package/math/mod2.glsl +0 -22
- package/math/mod2.hlsl +0 -24
- package/math/mod2.msl +0 -22
- package/math/mod289.cuh +0 -18
- package/math/mod289.glsl +0 -15
- package/math/mod289.hlsl +0 -15
- package/math/mod289.msl +0 -15
- package/math/mod289.wgsl +0 -9
- package/math/normalize.cuh +0 -36
- package/math/notEqual.msl +0 -17
- package/math/nyquist.glsl +0 -27
- package/math/nyquist.hlsl +0 -27
- package/math/operations.cuh +0 -289
- package/math/pack.glsl +0 -26
- package/math/pack.hlsl +0 -26
- package/math/pack.msl +0 -26
- package/math/pack.wgsl +0 -17
- package/math/parabola.cuh +0 -15
- package/math/parabola.glsl +0 -13
- package/math/parabola.hlsl +0 -11
- package/math/parabola.msl +0 -13
- package/math/parabola.wgsl +0 -7
- package/math/permute.cuh +0 -17
- package/math/permute.glsl +0 -19
- package/math/permute.hlsl +0 -17
- package/math/permute.msl +0 -19
- package/math/permute.wgsl +0 -11
- package/math/pow.cuh +0 -23
- package/math/pow2.cuh +0 -20
- package/math/pow2.glsl +0 -18
- package/math/pow2.hlsl +0 -18
- package/math/pow2.msl +0 -18
- package/math/pow3.cuh +0 -20
- package/math/pow3.glsl +0 -18
- package/math/pow3.hlsl +0 -18
- package/math/pow3.msl +0 -18
- package/math/pow5.cuh +0 -35
- package/math/pow5.glsl +0 -33
- package/math/pow5.hlsl +0 -33
- package/math/pow5.msl +0 -33
- package/math/pow7.cuh +0 -20
- package/math/pow7.glsl +0 -18
- package/math/pow7.hlsl +0 -18
- package/math/pow7.msl +0 -18
- package/math/powFast.cuh +0 -17
- package/math/powFast.glsl +0 -15
- package/math/powFast.hlsl +0 -15
- package/math/powFast.msl +0 -15
- package/math/powFast.wgsl +0 -12
- package/math/quartic.cuh +0 -17
- package/math/quartic.glsl +0 -17
- package/math/quartic.hlsl +0 -15
- package/math/quartic.msl +0 -17
- package/math/quartic.wgsl +0 -9
- package/math/quat/2mat3.glsl +0 -32
- package/math/quat/2mat3.hlsl +0 -32
- package/math/quat/2mat3.msl +0 -32
- package/math/quat/2mat3.wgsl +0 -26
- package/math/quat/2mat4.glsl +0 -18
- package/math/quat/2mat4.hlsl +0 -18
- package/math/quat/2mat4.msl +0 -18
- package/math/quat/2mat4.wgsl +0 -13
- package/math/quat/add.glsl +0 -15
- package/math/quat/add.hlsl +0 -15
- package/math/quat/add.msl +0 -15
- package/math/quat/add.wgsl +0 -10
- package/math/quat/conj.glsl +0 -15
- package/math/quat/conj.hlsl +0 -15
- package/math/quat/conj.msl +0 -15
- package/math/quat/conj.wgsl +0 -10
- package/math/quat/div.glsl +0 -15
- package/math/quat/div.hlsl +0 -15
- package/math/quat/div.msl +0 -15
- package/math/quat/div.wgsl +0 -10
- package/math/quat/identity.glsl +0 -14
- package/math/quat/identity.hlsl +0 -14
- package/math/quat/identity.msl +0 -14
- package/math/quat/identity.wgsl +0 -10
- package/math/quat/inverse.glsl +0 -17
- package/math/quat/inverse.hlsl +0 -17
- package/math/quat/inverse.msl +0 -17
- package/math/quat/inverse.wgsl +0 -14
- package/math/quat/length.glsl +0 -15
- package/math/quat/length.hlsl +0 -15
- package/math/quat/length.msl +0 -15
- package/math/quat/length.wgsl +0 -12
- package/math/quat/lengthSq.glsl +0 -15
- package/math/quat/lengthSq.hlsl +0 -15
- package/math/quat/lengthSq.msl +0 -15
- package/math/quat/lengthSq.wgsl +0 -10
- package/math/quat/lerp.glsl +0 -47
- package/math/quat/lerp.hlsl +0 -47
- package/math/quat/lerp.msl +0 -47
- package/math/quat/lerp.wgsl +0 -43
- package/math/quat/mul.glsl +0 -22
- package/math/quat/mul.hlsl +0 -22
- package/math/quat/mul.msl +0 -22
- package/math/quat/mul.wgsl +0 -15
- package/math/quat/neg.glsl +0 -15
- package/math/quat/neg.hlsl +0 -15
- package/math/quat/neg.msl +0 -15
- package/math/quat/neg.wgsl +0 -10
- package/math/quat/norm.glsl +0 -16
- package/math/quat/norm.hlsl +0 -16
- package/math/quat/norm.msl +0 -16
- package/math/quat/norm.wgsl +0 -13
- package/math/quat/sub.glsl +0 -15
- package/math/quat/sub.hlsl +0 -15
- package/math/quat/sub.msl +0 -15
- package/math/quat/sub.wgsl +0 -10
- package/math/quat/type.glsl +0 -11
- package/math/quat/type.hlsl +0 -11
- package/math/quat/type.msl +0 -11
- package/math/quat.glsl +0 -83
- package/math/quat.hlsl +0 -83
- package/math/quat.msl +0 -83
- package/math/quat.wgsl +0 -73
- package/math/quintic.cuh +0 -17
- package/math/quintic.glsl +0 -17
- package/math/quintic.hlsl +0 -15
- package/math/quintic.msl +0 -17
- package/math/quintic.wgsl +0 -9
- package/math/radians.msl +0 -15
- package/math/reflect.cuh +0 -19
- package/math/rotate2d.glsl +0 -17
- package/math/rotate2d.hlsl +0 -17
- package/math/rotate2d.msl +0 -17
- package/math/rotate2d.wgsl +0 -13
- package/math/rotate3d.glsl +0 -22
- package/math/rotate3d.hlsl +0 -22
- package/math/rotate3d.msl +0 -21
- package/math/rotate3d.wgsl +0 -16
- package/math/rotate3dX.glsl +0 -19
- package/math/rotate3dX.hlsl +0 -19
- package/math/rotate3dX.msl +0 -17
- package/math/rotate3dX.wgsl +0 -13
- package/math/rotate3dY.glsl +0 -19
- package/math/rotate3dY.hlsl +0 -19
- package/math/rotate3dY.msl +0 -17
- package/math/rotate3dY.wgsl +0 -13
- package/math/rotate3dZ.glsl +0 -19
- package/math/rotate3dZ.hlsl +0 -19
- package/math/rotate3dZ.msl +0 -17
- package/math/rotate3dZ.wgsl +0 -13
- package/math/rotate4d.glsl +0 -23
- package/math/rotate4d.hlsl +0 -22
- package/math/rotate4d.msl +0 -22
- package/math/rotate4d.wgsl +0 -17
- package/math/rotate4dX.glsl +0 -20
- package/math/rotate4dX.hlsl +0 -20
- package/math/rotate4dX.msl +0 -18
- package/math/rotate4dX.wgsl +0 -14
- package/math/rotate4dY.glsl +0 -20
- package/math/rotate4dY.hlsl +0 -20
- package/math/rotate4dY.msl +0 -18
- package/math/rotate4dY.wgsl +0 -14
- package/math/rotate4dZ.glsl +0 -20
- package/math/rotate4dZ.hlsl +0 -20
- package/math/rotate4dZ.msl +0 -18
- package/math/rotate4dZ.wgsl +0 -14
- package/math/round.glsl +0 -16
- package/math/round.msl +0 -16
- package/math/round.wgsl +0 -12
- package/math/saturate.cuh +0 -20
- package/math/saturate.glsl +0 -15
- package/math/saturate.msl +0 -12
- package/math/saturate.msl 2 +0 -15
- package/math/saturateMediump.cuh +0 -24
- package/math/saturateMediump.glsl +0 -23
- package/math/saturateMediump.hlsl +0 -23
- package/math/saturateMediump.msl +0 -23
- package/math/scale2d.glsl +0 -16
- package/math/scale2d.hlsl +0 -16
- package/math/scale2d.msl +0 -16
- package/math/scale2d.wgsl +0 -9
- package/math/scale3d.glsl +0 -30
- package/math/scale3d.hlsl +0 -30
- package/math/scale3d.msl +0 -30
- package/math/scale3d.wgsl +0 -13
- package/math/scale4d.glsl +0 -47
- package/math/scale4d.hlsl +0 -47
- package/math/scale4d.msl +0 -47
- package/math/scale4d.wgsl +0 -14
- package/math/select.glsl +0 -17
- package/math/select.hlsl +0 -17
- package/math/select.msl +0 -17
- package/math/sign.cuh +0 -15
- package/math/sin.cuh +0 -17
- package/math/smootherstep.cuh +0 -19
- package/math/smootherstep.glsl +0 -19
- package/math/smootherstep.hlsl +0 -18
- package/math/smootherstep.msl +0 -19
- package/math/smootherstep.wgsl +0 -15
- package/math/smoothstep.cuh +0 -40
- package/math/sqrt.cuh +0 -19
- package/math/step.cuh +0 -32
- package/math/sum.cuh +0 -30
- package/math/sum.glsl +0 -16
- package/math/sum.hlsl +0 -16
- package/math/sum.msl +0 -16
- package/math/sum.wgsl +0 -13
- package/math/taylorInvSqrt.cuh +0 -15
- package/math/taylorInvSqrt.glsl +0 -13
- package/math/taylorInvSqrt.hlsl +0 -13
- package/math/taylorInvSqrt.msl +0 -13
- package/math/taylorInvSqrt.wgsl +0 -9
- package/math/toMat3.glsl +0 -19
- package/math/toMat4.glsl +0 -18
- package/math/toMat4.hlsl +0 -18
- package/math/toMat4.msl +0 -18
- package/math/toMat4.wgsl +0 -14
- package/math/translate4d.glsl +0 -26
- package/math/translate4d.hlsl +0 -26
- package/math/translate4d.msl +0 -26
- package/math/translate4d.wgsl +0 -14
- package/math/transpose.glsl +0 -21
- package/math/unpack.cuh +0 -59
- package/math/unpack.glsl +0 -72
- package/math/unpack.hlsl +0 -72
- package/math/unpack.msl +0 -72
- package/math/unpack.wgsl +0 -56
- package/math/within.cuh +0 -33
- package/math/within.glsl +0 -30
- package/math/within.hlsl +0 -31
- package/math/within.msl +0 -30
- package/math/within.wgsl +0 -26
- package/math.cuh +0 -62
- package/math.glsl +0 -62
- package/math.hlsl +0 -57
- package/math.msl +0 -64
- package/math.wgsl +0 -47
- package/morphological/alphaFill.glsl +0 -51
- package/morphological/alphaFill.hlsl +0 -40
- package/morphological/alphaHashing.glsl +0 -56
- package/morphological/dilation.glsl +0 -51
- package/morphological/dilation.hlsl +0 -50
- package/morphological/erosion.glsl +0 -51
- package/morphological/erosion.hlsl +0 -50
- package/morphological/jumpFlood.glsl +0 -85
- package/morphological/marchingSquares.glsl +0 -207
- package/morphological/pyramid/downscale.glsl +0 -49
- package/morphological/pyramid/upscale.glsl +0 -72
- package/morphological/pyramid.glsl +0 -40
- package/prune.py +0 -61
- package/sample/2DCube.glsl +0 -70
- package/sample/2DCube.hlsl +0 -66
- package/sample/3DSdf.glsl +0 -40
- package/sample/3DSdf.hlsl +0 -40
- package/sample/bicubic.glsl +0 -60
- package/sample/bicubic.hlsl +0 -58
- package/sample/bracketing.glsl +0 -61
- package/sample/bracketing.hlsl +0 -60
- package/sample/bumpMap.glsl +0 -23
- package/sample/bumpMap.hlsl +0 -23
- package/sample/clamp2edge.glsl +0 -28
- package/sample/clamp2edge.hlsl +0 -24
- package/sample/clamp2edge.msl +0 -28
- package/sample/derivative.glsl +0 -49
- package/sample/derivative.hlsl +0 -49
- package/sample/dither.glsl +0 -33
- package/sample/dof.glsl +0 -118
- package/sample/dof.hlsl +0 -123
- package/sample/equirect.glsl +0 -71
- package/sample/equirect.hlsl +0 -58
- package/sample/flow.glsl +0 -32
- package/sample/flow.hlsl +0 -33
- package/sample/fxaa.glsl +0 -74
- package/sample/fxaa.hlsl +0 -73
- package/sample/heatmap.glsl +0 -23
- package/sample/heatmap.hlsl +0 -23
- package/sample/hue.glsl +0 -24
- package/sample/hue.hlsl +0 -24
- package/sample/mirror.glsl +0 -22
- package/sample/mirror.hlsl +0 -20
- package/sample/nearest.glsl +0 -22
- package/sample/nearest.hlsl +0 -20
- package/sample/normalFromHeightMap.glsl +0 -35
- package/sample/normalFromHeightMap.hlsl +0 -35
- package/sample/normalMap.glsl +0 -17
- package/sample/normalMap.hlsl +0 -17
- package/sample/opticalFlow.glsl +0 -32
- package/sample/opticalFlow.hlsl +0 -32
- package/sample/quilt.glsl +0 -54
- package/sample/quilt.hlsl +0 -54
- package/sample/repeat.glsl +0 -19
- package/sample/repeat.hlsl +0 -19
- package/sample/shadow.glsl +0 -39
- package/sample/shadow.hlsl +0 -35
- package/sample/shadowLerp.glsl +0 -29
- package/sample/shadowLerp.hlsl +0 -29
- package/sample/shadowPCF.glsl +0 -33
- package/sample/shadowPCF.hlsl +0 -33
- package/sample/smooth.glsl +0 -30
- package/sample/smooth.hlsl +0 -28
- package/sample/sprite.glsl +0 -32
- package/sample/sprite.hlsl +0 -32
- package/sample/triplanar.glsl +0 -44
- package/sample/triplanar.hlsl +0 -45
- package/sample/untile.glsl +0 -104
- package/sample/untile.hlsl +0 -65
- package/sample/viewPosition.glsl +0 -41
- package/sample/viewPosition.hlsl +0 -40
- package/sample/yuv.glsl +0 -23
- package/sample/yuv.hlsl +0 -23
- package/sample/zero.glsl +0 -38
- package/sample/zero.hlsl +0 -19
- package/sample.glsl +0 -32
- package/sample.hlsl +0 -32
- package/sampler.glsl +0 -18
- package/sampler.hlsl +0 -50
- package/sampler.msl +0 -19
- package/sdf/arrowSDF.glsl +0 -60
- package/sdf/arrowSDF.msl +0 -60
- package/sdf/boxFrameSDF.glsl +0 -20
- package/sdf/boxFrameSDF.hlsl +0 -20
- package/sdf/boxFrameSDF.msl +0 -20
- package/sdf/boxSDF.glsl +0 -20
- package/sdf/boxSDF.hlsl +0 -20
- package/sdf/boxSDF.msl +0 -20
- package/sdf/boxSDF.wgsl +0 -10
- package/sdf/capsuleSDF.glsl +0 -17
- package/sdf/capsuleSDF.hlsl +0 -16
- package/sdf/capsuleSDF.msl +0 -17
- package/sdf/circleSDF.glsl +0 -30
- package/sdf/circleSDF.hlsl +0 -28
- package/sdf/circleSDF.msl +0 -30
- package/sdf/coneSDF.glsl +0 -44
- package/sdf/coneSDF.hlsl +0 -44
- package/sdf/coneSDF.msl +0 -44
- package/sdf/crossSDF.glsl +0 -23
- package/sdf/crossSDF.hlsl +0 -19
- package/sdf/crossSDF.msl +0 -23
- package/sdf/cubeSDF.glsl +0 -11
- package/sdf/cubeSDF.hlsl +0 -11
- package/sdf/cubeSDF.msl +0 -11
- package/sdf/cylinderSDF.glsl +0 -42
- package/sdf/cylinderSDF.hlsl +0 -42
- package/sdf/cylinderSDF.msl +0 -42
- package/sdf/cylinderSDF.wgsl +0 -10
- package/sdf/dodecahedronSDF.glsl +0 -31
- package/sdf/dodecahedronSDF.hlsl +0 -31
- package/sdf/dodecahedronSDF.msl +0 -31
- package/sdf/ellipsoidSDF.glsl +0 -16
- package/sdf/ellipsoidSDF.hlsl +0 -16
- package/sdf/ellipsoidSDF.msl +0 -16
- package/sdf/flowerSDF.glsl +0 -28
- package/sdf/flowerSDF.hlsl +0 -24
- package/sdf/flowerSDF.msl +0 -28
- package/sdf/gearSDF.glsl +0 -38
- package/sdf/gearSDF.hlsl +0 -37
- package/sdf/gearSDF.msl +0 -38
- package/sdf/heartSDF.glsl +0 -25
- package/sdf/heartSDF.hlsl +0 -23
- package/sdf/heartSDF.msl +0 -25
- package/sdf/hexPrismSDF.glsl +0 -17
- package/sdf/hexPrismSDF.hlsl +0 -17
- package/sdf/hexPrismSDF.msl +0 -17
- package/sdf/hexSDF.glsl +0 -26
- package/sdf/hexSDF.hlsl +0 -22
- package/sdf/hexSDF.msl +0 -26
- package/sdf/icosahedronSDF.glsl +0 -24
- package/sdf/icosahedronSDF.hlsl +0 -24
- package/sdf/icosahedronSDF.msl +0 -24
- package/sdf/juliaSDF.glsl +0 -44
- package/sdf/juliaSDF.hlsl +0 -34
- package/sdf/juliaSDF.msl +0 -44
- package/sdf/kochSDF.glsl +0 -40
- package/sdf/kochSDF.hlsl +0 -35
- package/sdf/kochSDF.msl +0 -40
- package/sdf/lineSDF.glsl +0 -22
- package/sdf/lineSDF.hlsl +0 -15
- package/sdf/lineSDF.msl +0 -22
- package/sdf/linkSDF.glsl +0 -13
- package/sdf/linkSDF.hlsl +0 -13
- package/sdf/linkSDF.msl +0 -13
- package/sdf/mandelbulbSDF.glsl +0 -43
- package/sdf/mandelbulbSDF.hlsl +0 -43
- package/sdf/mandelbulbSDF.msl +0 -43
- package/sdf/octahedronSDF.glsl +0 -39
- package/sdf/octahedronSDF.hlsl +0 -39
- package/sdf/octahedronSDF.msl +0 -39
- package/sdf/octogonPrismSDF.glsl +0 -24
- package/sdf/octogonPrismSDF.hlsl +0 -24
- package/sdf/octogonPrismSDF.msl +0 -24
- package/sdf/opElongate.glsl +0 -24
- package/sdf/opElongate.hlsl +0 -24
- package/sdf/opElongate.msl +0 -24
- package/sdf/opExtrude.glsl +0 -16
- package/sdf/opExtrude.hlsl +0 -16
- package/sdf/opExtrude.msl +0 -16
- package/sdf/opIntersection.glsl +0 -28
- package/sdf/opIntersection.hlsl +0 -28
- package/sdf/opIntersection.msl +0 -19
- package/sdf/opOnion.glsl +0 -15
- package/sdf/opOnion.hlsl +0 -15
- package/sdf/opOnion.msl +0 -15
- package/sdf/opRepeat.glsl +0 -27
- package/sdf/opRepeat.hlsl +0 -29
- package/sdf/opRepeat.msl +0 -27
- package/sdf/opRevolve.glsl +0 -15
- package/sdf/opRevolve.hlsl +0 -15
- package/sdf/opRevolve.msl +0 -15
- package/sdf/opRound.glsl +0 -15
- package/sdf/opRound.hlsl +0 -15
- package/sdf/opRound.msl +0 -15
- package/sdf/opSubtraction.glsl +0 -28
- package/sdf/opSubtraction.hlsl +0 -17
- package/sdf/opSubtraction.msl +0 -26
- package/sdf/opSubtraction.wgsl +0 -7
- package/sdf/opUnion.cuh +0 -30
- package/sdf/opUnion.glsl +0 -36
- package/sdf/opUnion.hlsl +0 -35
- package/sdf/opUnion.msl +0 -26
- package/sdf/opUnion.wgsl +0 -7
- package/sdf/planeSDF.cuh +0 -16
- package/sdf/planeSDF.glsl +0 -16
- package/sdf/planeSDF.hlsl +0 -16
- package/sdf/planeSDF.msl +0 -16
- package/sdf/polySDF.glsl +0 -30
- package/sdf/polySDF.hlsl +0 -26
- package/sdf/polySDF.msl +0 -30
- package/sdf/pyramidSDF.glsl +0 -36
- package/sdf/pyramidSDF.hlsl +0 -34
- package/sdf/pyramidSDF.msl +0 -36
- package/sdf/raysSDF.glsl +0 -26
- package/sdf/raysSDF.hlsl +0 -22
- package/sdf/raysSDF.msl +0 -26
- package/sdf/rectSDF.glsl +0 -47
- package/sdf/rectSDF.hlsl +0 -39
- package/sdf/rectSDF.msl +0 -47
- package/sdf/rectSDF.wgsl +0 -22
- package/sdf/rhombSDF.glsl +0 -26
- package/sdf/rhombSDF.hlsl +0 -23
- package/sdf/rhombSDF.msl +0 -26
- package/sdf/sphereSDF.cuh +0 -15
- package/sdf/sphereSDF.glsl +0 -11
- package/sdf/sphereSDF.hlsl +0 -11
- package/sdf/sphereSDF.msl +0 -11
- package/sdf/sphereSDF.wgsl +0 -9
- package/sdf/spiralSDF.glsl +0 -26
- package/sdf/spiralSDF.hlsl +0 -22
- package/sdf/spiralSDF.msl +0 -26
- package/sdf/starSDF.glsl +0 -36
- package/sdf/starSDF.hlsl +0 -33
- package/sdf/starSDF.msl +0 -36
- package/sdf/superShapeSDF.glsl +0 -54
- package/sdf/superShapeSDF.hlsl +0 -43
- package/sdf/superShapeSDF.msl +0 -54
- package/sdf/tetrahedronSDF.glsl +0 -17
- package/sdf/tetrahedronSDF.hlsl +0 -17
- package/sdf/tetrahedronSDF.msl +0 -17
- package/sdf/torusSDF.glsl +0 -16
- package/sdf/torusSDF.hlsl +0 -16
- package/sdf/torusSDF.msl +0 -16
- package/sdf/torusSDF.wgsl +0 -9
- package/sdf/triPrismSDF.glsl +0 -45
- package/sdf/triPrismSDF.hlsl +0 -45
- package/sdf/triPrismSDF.msl +0 -45
- package/sdf/triSDF.glsl +0 -26
- package/sdf/triSDF.hlsl +0 -22
- package/sdf/triSDF.msl +0 -26
- package/sdf/vesicaSDF.glsl +0 -25
- package/sdf/vesicaSDF.hlsl +0 -23
- package/sdf/vesicaSDF.msl +0 -25
- package/sdf.glsl +0 -46
- package/sdf.hlsl +0 -45
- package/sdf.msl +0 -46
- package/space/aspect.glsl +0 -18
- package/space/aspect.hlsl +0 -20
- package/space/aspect.msl +0 -18
- package/space/bracketing.glsl +0 -51
- package/space/bracketing.hlsl +0 -52
- package/space/bracketing.msl +0 -51
- package/space/brickTile.glsl +0 -37
- package/space/brickTile.hlsl +0 -31
- package/space/brickTile.msl +0 -37
- package/space/cart2polar.glsl +0 -22
- package/space/cart2polar.hlsl +0 -22
- package/space/cart2polar.msl +0 -21
- package/space/center.glsl +0 -20
- package/space/center.hlsl +0 -20
- package/space/center.msl +0 -20
- package/space/checkerTile.glsl +0 -34
- package/space/checkerTile.hlsl +0 -32
- package/space/checkerTile.msl +0 -34
- package/space/depth2viewZ.glsl +0 -32
- package/space/depth2viewZ.hlsl +0 -32
- package/space/depth2viewZ.msl +0 -32
- package/space/displace.glsl +0 -79
- package/space/displace.hlsl +0 -74
- package/space/displace.msl +0 -79
- package/space/equirect2xyz.glsl +0 -22
- package/space/equirect2xyz.hlsl +0 -22
- package/space/equirect2xyz.msl +0 -22
- package/space/eulerView.glsl +0 -25
- package/space/eulerView.hlsl +0 -25
- package/space/fisheye2xyz.glsl +0 -23
- package/space/fisheye2xyz.hlsl +0 -23
- package/space/fisheye2xyz.msl +0 -23
- package/space/fisheye2xyz.wgsl +0 -22
- package/space/flipY.glsl +0 -15
- package/space/flipY.hlsl +0 -15
- package/space/flipY.msl +0 -15
- package/space/hexTile.glsl +0 -27
- package/space/hexTile.hlsl +0 -26
- package/space/hexTile.msl +0 -27
- package/space/kaleidoscope.glsl +0 -43
- package/space/kaleidoscope.hlsl +0 -43
- package/space/kaleidoscope.msl +0 -43
- package/space/linearizeDepth.glsl +0 -27
- package/space/linearizeDepth.hlsl +0 -27
- package/space/linearizeDepth.msl +0 -27
- package/space/lookAt.glsl +0 -46
- package/space/lookAt.hlsl +0 -50
- package/space/lookAt.msl +0 -51
- package/space/lookAtView.glsl +0 -28
- package/space/lookAtView.hlsl +0 -28
- package/space/mirrorTile.glsl +0 -39
- package/space/mirrorTile.hlsl +0 -36
- package/space/mirrorTile.msl +0 -39
- package/space/nearest.glsl +0 -20
- package/space/nearest.hlsl +0 -16
- package/space/nearest.msl +0 -20
- package/space/nearest.wgsl +0 -12
- package/space/orthographic.glsl +0 -20
- package/space/orthographic.msl +0 -20
- package/space/parallaxMapping.glsl +0 -234
- package/space/parallaxMapping.hlsl +0 -234
- package/space/parallaxMapping.msl +0 -234
- package/space/perspective.glsl +0 -24
- package/space/perspective.msl +0 -24
- package/space/polar2cart.glsl +0 -22
- package/space/polar2cart.hlsl +0 -22
- package/space/polar2cart.msl +0 -10
- package/space/ratio.cuh +0 -21
- package/space/ratio.glsl +0 -21
- package/space/ratio.hlsl +0 -19
- package/space/ratio.msl +0 -21
- package/space/ratio.wgsl +0 -17
- package/space/rotate.glsl +0 -80
- package/space/rotate.hlsl +0 -65
- package/space/rotate.msl +0 -80
- package/space/rotate.wgsl +0 -20
- package/space/rotateX.glsl +0 -39
- package/space/rotateX.hlsl +0 -27
- package/space/rotateX.msl +0 -39
- package/space/rotateY.glsl +0 -39
- package/space/rotateY.hlsl +0 -27
- package/space/rotateY.msl +0 -39
- package/space/rotateZ.glsl +0 -39
- package/space/rotateZ.hlsl +0 -27
- package/space/rotateZ.msl +0 -39
- package/space/scale.glsl +0 -63
- package/space/scale.hlsl +0 -68
- package/space/scale.msl +0 -63
- package/space/scale.wgsl +0 -14
- package/space/screen2viewPosition.glsl +0 -33
- package/space/screen2viewPosition.hlsl +0 -33
- package/space/screen2viewPosition.msl +0 -33
- package/space/sprite.glsl +0 -21
- package/space/sprite.hlsl +0 -20
- package/space/sprite.msl +0 -21
- package/space/sqTile.glsl +0 -14
- package/space/sqTile.hlsl +0 -14
- package/space/sqTile.msl +0 -14
- package/space/tbn.glsl +0 -21
- package/space/tbn.hlsl +0 -25
- package/space/translate.glsl +0 -20
- package/space/translate.hlsl +0 -19
- package/space/triTile.glsl +0 -23
- package/space/triTile.hlsl +0 -22
- package/space/triTile.msl +0 -23
- package/space/uncenter.glsl +0 -19
- package/space/uncenter.hlsl +0 -19
- package/space/uncenter.msl +0 -19
- package/space/unratio.glsl +0 -13
- package/space/unratio.hlsl +0 -15
- package/space/unratio.msl +0 -13
- package/space/view2screenPosition.glsl +0 -22
- package/space/view2screenPosition.hlsl +0 -22
- package/space/view2screenPosition.msl +0 -22
- package/space/viewZ2depth.glsl +0 -30
- package/space/viewZ2depth.hlsl +0 -30
- package/space/viewZ2depth.msl +0 -30
- package/space/windmillTile.glsl +0 -43
- package/space/windmillTile.hlsl +0 -41
- package/space/windmillTile.msl +0 -43
- package/space/xyz2equirect.glsl +0 -17
- package/space/xyz2equirect.hlsl +0 -17
- package/space/xyz2equirect.msl +0 -17
- package/version.glsl +0 -18
- package/version.hlsl +0 -18
- package/version.wgsl +0 -10
- package/webpack.config.js +0 -59
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<img src="https://lygia.xyz/imgs/lygia.svg" alt="LYGIA" width="200" style="display: block; margin-left: auto; margin-right: auto; filter: drop-shadow(2px 3px 4px gray);">
|
|
2
2
|
|
|
3
|
-
# LYGIA Shader Library
|
|
3
|
+
# LYGIA Shader Library
|
|
4
4
|
|
|
5
|
-
LYGIA is the biggest shader library. Battle proof, cross
|
|
5
|
+
LYGIA is the biggest shader library. Battle proof, cross-platform and multi-language. Is made of reusable functions that will let you prototype, port and ship projects in just few minutes. It's very granular, flexible and efficient, supports multiple shading languages and can easily be added to virtually any project. There are already integrations for almost all major environments, engines and frameworks.
|
|
6
6
|
|
|
7
|
-
Best of all, LYGIA grows and improves every day thanks to the support of the community. Become a [Contributor](https://github.com/patriciogonzalezvivo/lygia) or a [](https://github.com/sponsors/patriciogonzalezvivo)
|
|
7
|
+
Best of all, LYGIA grows and improves every day thanks to the support of the community. Become a [Contributor](https://github.com/patriciogonzalezvivo/lygia) or a [](https://github.com/sponsors/patriciogonzalezvivo).
|
|
8
8
|
|
|
9
9
|
## How to use it?
|
|
10
10
|
|
|
11
|
-
In your shader just `#include` the functions you need and
|
|
11
|
+
In your shader just `#include` the functions you need and use them:
|
|
12
12
|
|
|
13
13
|
<div class="codeAndCanvas" data="example.frag">
|
|
14
14
|
|
|
@@ -65,7 +65,7 @@ LYGIA have been integrated into the following Engines, Frameworks, Creative Tool
|
|
|
65
65
|
<p style="text-align: center;" >
|
|
66
66
|
<a href="https://github.com/patriciogonzalezvivo/lygia_p5_examples"><img src="https://lygia.xyz/imgs/p5.png" alt="p5" title="processing" width="64" /></a>
|
|
67
67
|
<a href="https://editor.p5js.org/patriciogonzalezvivo/sketches"><img src="https://lygia.xyz/imgs/p5js.png" alt="p5js" title="p5js" width="64" /></a>
|
|
68
|
-
<a href="https://github.com/patriciogonzalezvivo/lygia_of_examples"><img src="https://lygia.xyz/imgs/of.png" alt="openFrameworks"
|
|
68
|
+
<a href="https://github.com/patriciogonzalezvivo/lygia_of_examples"><img src="https://lygia.xyz/imgs/of.png" alt="openFrameworks" title="openframeworks" width="64" /></a>
|
|
69
69
|
<a href="https://github.com/vectorsize/lygia-td"><img title="static-resolver by vectorsize" src="https://lygia.xyz/imgs/td.png" alt="touchDesigner" title="touchDesigner" width="64" /></a>
|
|
70
70
|
<a href="https://github.com/patriciogonzalezvivo/comfyui_glslnodes"><img src="https://lygia.xyz/imgs/comfy.png" alt="comfyui" title="comfyUI" width="64" /></a>
|
|
71
71
|
<a href="https://github.com/ossia/score-examples"><img src="https://lygia.xyz/imgs/ossia.png" alt="ossia" title="ossia" width="64" /></a>
|
|
@@ -80,11 +80,11 @@ LYGIA have been integrated into the following Engines, Frameworks, Creative Tool
|
|
|
80
80
|
<a href="https://dev.shader.app/"><img src="https://dev.shaders.app/apple-touch-icon.png" alt="shaderApp" title="shaderApp" width="64"/></a>
|
|
81
81
|
</p>
|
|
82
82
|
|
|
83
|
-
If you are working on a project and want to use LYGIA, you have two options: cloning a **local** version that
|
|
83
|
+
If you are working on a project and want to use LYGIA, you have two options: cloning a **local** version that you can bundle into your project; or using the **server** ( https://lygia.xyz ) to resolve the dependencies online.
|
|
84
84
|
|
|
85
85
|
### LYGIA Locally
|
|
86
86
|
|
|
87
|
-
If you want to work **locally**, you must ensure that your environment can resolve `#include` dependencies. You can find some examples in [here
|
|
87
|
+
If you want to work **locally**, you must ensure that your environment can resolve `#include` dependencies. You can find some examples in [here specifically for GLSL](https://github.com/patriciogonzalezvivo/lygia/blob/main/README_GLSL.md). Then you just need to clone LYGIA into your project relative to the shader you are loading:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
git clone https://github.com/patriciogonzalezvivo/lygia.git
|
|
@@ -108,26 +108,25 @@ If you are concerned about the size of the library you might also be interested
|
|
|
108
108
|
python prune.py --all --keep glsl
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Alternatively, if
|
|
112
|
-
|
|
113
|
-
If you are working on web project you may want to resolve the dependencies using a bundler like [vite glsl plugin (local bundle)](https://github.com/UstymUkhman/vite-plugin-glsl), [esbuild glsl plugin (local bundle)](https://github.com/ricardomatias/esbuild-plugin-glsl-include) or [webpack glsl plugin (local bundle)](https://github.com/grieve/webpack-glsl-loader).
|
|
111
|
+
Alternatively, if you are working on a `npm` project, there is a [npm bundle](https://www.npmjs.com/package/lygia) you could use.
|
|
114
112
|
|
|
113
|
+
If you are working on a web project you may want to resolve the dependencies using a bundler like [vite glsl plugin (local bundle)](https://github.com/UstymUkhman/vite-plugin-glsl), [esbuild glsl plugin (local bundle)](https://github.com/ricardomatias/esbuild-plugin-glsl-include) or [webpack glsl plugin (local bundle)](https://github.com/grieve/webpack-glsl-loader).
|
|
115
114
|
|
|
116
115
|
### LYGIA server
|
|
117
116
|
|
|
118
|
-
If you are working on a **cloud platform** (like [CodePen](https://codepen.io/) or [Observable](https://observablehq.com/@radames/hello-lygia-shader-library)
|
|
117
|
+
If you are working on a **cloud platform** (like [CodePen](https://codepen.io/) or [Observable](https://observablehq.com/@radames/hello-lygia-shader-library)) you probably want to resolve the dependencies without needing to install anything. For that just add a link to `https://lygia.xyz/resolve.js` (JS) or `https://lygia.xyz/resolve.esm.js` (ES6 module):
|
|
119
118
|
|
|
120
119
|
```html
|
|
121
|
-
<!--
|
|
120
|
+
<!-- As JavaScript source -->
|
|
122
121
|
<script src="https://lygia.xyz/resolve.js"></script>
|
|
123
122
|
|
|
124
|
-
<!-- Or as
|
|
123
|
+
<!-- Or as an ES6 module -->
|
|
125
124
|
<script type="module">
|
|
126
125
|
import resolveLygia from "https://lygia.xyz/resolve.esm.js"
|
|
127
126
|
</script>
|
|
128
127
|
```
|
|
129
128
|
|
|
130
|
-
|
|
129
|
+
Then you can resolve the dependencies by passing a `string` or `strings[]` to `resolveLygia()` or `resolveLygiaAsync()`:
|
|
131
130
|
|
|
132
131
|
```js
|
|
133
132
|
// 1. FIRST
|
|
@@ -138,7 +137,7 @@ To then resolve the dependencies by passing a `string` or `strings[]` to `resolv
|
|
|
138
137
|
|
|
139
138
|
// OR.
|
|
140
139
|
|
|
141
|
-
//
|
|
140
|
+
// Async resolver, all includes in parallel calls
|
|
142
141
|
vertSource = resolveLygiaAsync(vertSource);
|
|
143
142
|
fragSource = resolveLygiaAsync(fragSource);
|
|
144
143
|
|
|
@@ -165,19 +164,18 @@ The functions are divided into different categories:
|
|
|
165
164
|
* [`animation/`](https://lygia.xyz/animation): animation operations: easing
|
|
166
165
|
* [`generative/`](https://lygia.xyz/generative): generative functions: `random()`, `noise()`, etc.
|
|
167
166
|
* [`sdf/`](https://lygia.xyz/sdf): signed distance field functions.
|
|
168
|
-
* [`draw/`](https://lygia.xyz/draw): drawing functions like `digits()`, `stroke()`, `fill`, etc
|
|
167
|
+
* [`draw/`](https://lygia.xyz/draw): drawing functions like `digits()`, `stroke()`, `fill`, etc.
|
|
169
168
|
* [`sample/`](https://lygia.xyz/sample): sample operations
|
|
170
169
|
* [`filter/`](https://lygia.xyz/filter): typical filter operations: different kind of blurs, mean and median filters.
|
|
171
170
|
* [`distort/`](https://lygia.xyz/distort): distort sampling operations
|
|
172
|
-
* [`lighting/`](https://lygia.xyz/lighting): different lighting models and functions for
|
|
171
|
+
* [`lighting/`](https://lygia.xyz/lighting): different lighting models and functions for forward/deferred/raymarching rendering
|
|
173
172
|
* [`geometry/`](https://lygia.xyz/geometry): operation related to geometries: intersections and AABB accelerating structures.
|
|
174
173
|
* [`morphological/`](https://lygia.xyz/morphological): morphological filters: dilation, erosion, alpha and poisson fill.
|
|
175
174
|
|
|
176
|
-
|
|
177
175
|
### How is it [designed](https://github.com/patriciogonzalezvivo/lygia/blob/main/DESIGN.md)?
|
|
178
176
|
|
|
179
|
-
LYGIA is designed to be very granular (each file holds one function),
|
|
180
|
-
There are some functions whose behavior can be changed using the `#
|
|
177
|
+
LYGIA is designed to be very granular (each file holds one function), multi-language (each language has its own file extension) and flexible. Flexible how?
|
|
178
|
+
There are some functions whose behavior can be changed using the `#define` keyword before including them. For example, [gaussian blurs](filter/gaussianBlur) are usually done in two passes. By default, these are performed on their 1D version, but if you are interested in using a 2D kernel, all in the same pass, you will need to add the `GAUSSIANBLUR_2D` keyword, as follows:
|
|
181
179
|
|
|
182
180
|
```glsl
|
|
183
181
|
|
|
@@ -204,38 +202,35 @@ In the same way you can change the sampling function that the gaussian uses. Ex:
|
|
|
204
202
|
#define GAUSSIANBLUR_SAMPLER_FNC(TEX, UV) sampleClamp2edge(TEX, UV)
|
|
205
203
|
```
|
|
206
204
|
|
|
207
|
-
Learn more about [
|
|
205
|
+
Learn more about [LYGIA's design principles in the DESIGN.md file](https://github.com/patriciogonzalezvivo/lygia/blob/main/DESIGN.md).
|
|
208
206
|
|
|
209
207
|
## Contributions
|
|
210
208
|
|
|
211
209
|
LYGIA has a long way to go and welcomes all kinds of contributions. You can help by:
|
|
212
210
|
|
|
213
211
|
* **Bug fixing**
|
|
214
|
-
* **Translation**, keeping parity between languages (GLSL, HLSL, MSL, WGSL, TSL, CUDA, OSL, etc) is a big part of the challenge. Not all
|
|
215
|
-
* **New functions or improving the current implementations**. Please take a look to the [
|
|
212
|
+
* **Translation**, keeping parity between languages (GLSL, HLSL, MSL, WGSL, TSL, CUDA, OSL, etc.) is a big part of the challenge. Not all languages are the same and we want to make sure each function is optimized and carefully crafted for each environment. This means, the more eyes are looking at this, the better. Please make sure to read and understand the [Design Principles](https://github.com/patriciogonzalezvivo/lygia/blob/main/DESIGN.md) before starting.
|
|
213
|
+
* **New functions or improving the current implementations**. Please take a look to the [Contribution Guidelines](https://github.com/patriciogonzalezvivo/lygia/blob/main/CONTRIBUTE.md) before starting.
|
|
216
214
|
* **Documentation**. Each function has a header with some information describing the function. Make sure to fill this information when adding a new function.
|
|
217
215
|
* Adding new **examples** and integrations for new environments like: [Godot](https://godotengine.org/), [ISF](https://isf.video/), [MaxMSP](https://cycling74.com/products/max), etc.
|
|
218
|
-
* **Financial** [sponsorships](https://github.com/sponsors/patriciogonzalezvivo). Right now, the money that flows in is invested on the server and
|
|
216
|
+
* **Financial** [sponsorships](https://github.com/sponsors/patriciogonzalezvivo). Right now, the money that flows in is invested on the server and infrastructure. Long term plan will be to be able to pay lead contributors and maintainers.
|
|
219
217
|
|
|
220
|
-
Collaborators and sponsors are automatically added to the [commercial license](https://lygia.xyz/license). Making a PR or subscribing to the
|
|
218
|
+
Collaborators and sponsors are automatically added to the [commercial license](https://lygia.xyz/license). Making a PR or subscribing to the GitHub sponsors program is the shortest path to get access to the commercial license. It's all automated, not red taping. LYGIA belongs to those that take care of it.
|
|
221
219
|
|
|
222
|
-
## License
|
|
220
|
+
## License
|
|
223
221
|
|
|
224
|
-
LYGIA belongs to those that support it. For that it
|
|
222
|
+
LYGIA belongs to those that support it. For that it is dual-licensed under the [Prosperity License](https://prosperitylicense.com/versions/3.0.0) and the [Patron License](https://lygia.xyz/license) for [sponsors](https://github.com/sponsors/patriciogonzalezvivo) and [contributors](https://github.com/patriciogonzalezvivo/lygia/graphs/contributors).
|
|
225
223
|
|
|
226
224
|
[Sponsors](https://github.com/sponsors/patriciogonzalezvivo) and [contributors](https://github.com/patriciogonzalezvivo/lygia/graphs/contributors) are automatically added to the [Patron License](https://lygia.xyz/license) and they can ignore any non-commercial rule of the [Prosperity License](https://prosperitylicense.com/versions/3.0.0) software.
|
|
227
225
|
|
|
228
226
|
It's also possible to get a permanent commercial license hooked to a single and specific version of LYGIA.
|
|
229
227
|
|
|
230
|
-
If you have doubts please
|
|
228
|
+
If you have doubts please reach out to patriciogonzalezvivo at gmail dot com
|
|
231
229
|
|
|
232
230
|
## Credits
|
|
233
231
|
|
|
234
|
-
Created and
|
|
232
|
+
Created and maintained by [Patricio Gonzalez Vivo](https://patriciogonzalezvivo.com/) ( <a rel="me" href="https://merveilles.town/@patricio">Mastodon</a> | [Twitter](https://twitter.com/patriciogv) | [Instagram](https://www.instagram.com/patriciogonzalezvivo/) | [GitHub](https://github.com/sponsors/patriciogonzalezvivo) ) and every direct or indirect [contributors](https://github.com/patriciogonzalezvivo/lygia/graphs/contributors) to the GitHub repository.
|
|
235
233
|
|
|
236
234
|
This library has been built in many cases on top of the work of brilliant and generous people like: [Inigo Quiles](https://www.iquilezles.org/), [Morgan McGuire](https://casual-effects.com/), [Alan Wolfe](https://blog.demofox.org/), [Matt DesLauriers](https://www.mattdesl.com/), [Bjorn Ottosson](https://github.com/bottosson), [Hugh Kennedy](https://github.com/hughsk), and many others.
|
|
237
235
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
It also is being constantly maintained, translated and/or extended by generous contributors like: [Shadi El Hajj](https://github.com/shadielhajj), [Kathy](https://github.com/kfahn22), [Bonsak Schiledrop](https://github.com/bonsak), [Amin Shazrin](https://github.com/ammein), [Guido Schmidt](https://github.com/guidoschmidt), and many others.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/add.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Add blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendAdd(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendAdd(base : f32, blend : f32) -> f32 { return min(base + blend, 1.0); }\nfn blendAdd3(base : vec3f, blend : vec3f) -> vec3f { return min(base + blend, vec3(1.0)); }\nfn blendAdd3Opacity(base : vec3f, blend : vec3f, opacity : f32) -> vec3f { return blendAdd3(base, blend) * opacity + base * (1.0 - opacity); }\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/average.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Average blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendAverage(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendAverage(base : f32, blend : f32) -> f32 { return (base + blend) * 0.5; }\nfn blendAverage3(base : vec3f, blend : vec3f) -> vec3f { return (base + blend) * 0.5; }\nfn blendAverage3Opacity(base : vec3f, blend : vec3f, opacity : f32) -> vec3f { return (blendAverage3(base, blend) * opacity + base * (1.0 - opacity)); }\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_space_rgb2hsv from "lygia/color/space/rgb2hsv";
|
|
2
|
+
import lygia_color_space_hsv2rgb from "lygia/color/space/hsv2rgb";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/color.wesl":
|
|
9
|
+
"import lygia::color::space::{rgb2hsv::rgb2hsv, hsv2rgb::hsv2rgb};\n\n/*\ncontributors: Romain Dura\ndescription: Color Blend mode creates the result color by combining the luminance of the base color with the hue and saturation of the blend color.\nuse: blendColor(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendColor(base: vec3f, blend: vec3f) -> vec3f {\n let baseHSL = rgb2hsv(base);\n let blendHSL = rgb2hsv(blend);\n\n return hsv2rgb(vec3f(blendHSL.x, blendHSL.y, baseHSL.z));\n}\n\nfn blendColorOpacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendColor(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_space_rgb2hsv, lygia_color_space_hsv2rgb],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/colorBurn.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Color Burn blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendColorBurn(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendColorBurn(base: f32, blend: f32) -> f32 {\n return select(max((1.0 - ((1.0 - base) / blend)), 0.0), blend, blend == 0.0);\n}\n\nfn blendColorBurn3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendColorBurn(base.r, blend.r),\n blendColorBurn(base.g, blend.g),\n blendColorBurn(base.b, blend.b)\n );\n}\n\nfn blendColorBurn3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendColorBurn3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/colorDodge.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Color Dodge blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendColorDodge(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendColorDodge(base: f32, blend: f32) -> f32 {\n return select(min(base / (1.0 - blend), 1.0), blend, blend == 1.0);\n}\n\nfn blendColorDodge3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendColorDodge(base.r, blend.r),\n blendColorDodge(base.g, blend.g),\n blendColorDodge(base.b, blend.b)\n );\n}\n\nfn blendColorDodge3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendColorDodge3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/darken.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Darken blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendDarken(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendDarken(base: f32, blend: f32) -> f32 {\n return min(blend, base);\n}\n\nfn blendDarken3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendDarken(base.r, blend.r),\n blendDarken(base.g, blend.g),\n blendDarken(base.b, blend.b)\n );\n}\n\nfn blendDarken3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendDarken3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/difference.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Difference blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendDifference(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendDifference(base: f32, blend: f32) -> f32 {\n return abs(base - blend);\n}\n\nfn blendDifference3(base: vec3f, blend: vec3f) -> vec3f {\n return abs(base - blend);\n}\n\nfn blendDifference3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendDifference3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/exclusion.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Exclusion blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendExclusion(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendExclusion(base: f32, blend: f32) -> f32 {\n return base + blend - 2.0 * base * blend;\n}\n\nfn blendExclusion3(base: vec3f, blend: vec3f) -> vec3f {\n return base + blend - 2.0 * base * blend;\n}\n\nfn blendExclusion3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendExclusion3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import lygia_color_blend_reflect from "lygia/color/blend/reflect";
|
|
2
|
+
|
|
3
|
+
export const weslBundle = {
|
|
4
|
+
name: "lygia",
|
|
5
|
+
edition: "unstable_2025_1",
|
|
6
|
+
modules: {
|
|
7
|
+
"color/blend/glow.wesl":
|
|
8
|
+
"import lygia::color::blend::reflect::{blendReflect, blendReflect3};\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop Glow blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendGlow(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendGlow(base: f32, blend: f32) -> f32 {\n return blendReflect(blend, base);\n}\n\nfn blendGlow3(base: vec3f, blend: vec3f) -> vec3f {\n return blendReflect3(blend, base);\n}\n\nfn blendGlow3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendGlow3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
9
|
+
},
|
|
10
|
+
dependencies: [lygia_color_blend_reflect],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default weslBundle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import lygia_color_blend_overlay from "lygia/color/blend/overlay";
|
|
2
|
+
|
|
3
|
+
export const weslBundle = {
|
|
4
|
+
name: "lygia",
|
|
5
|
+
edition: "unstable_2025_1",
|
|
6
|
+
modules: {
|
|
7
|
+
"color/blend/hardLight.wesl":
|
|
8
|
+
"import lygia::color::blend::overlay::blendOverlay;\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop HardLight blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendHardLight(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendHardLight(base: f32, blend: f32) -> f32 {\n return blendOverlay(blend, base);\n}\n\nfn blendHardLight3(base: vec3f, blend: vec3f) -> vec3f {\n return blendOverlay(blend, base);\n}\n\nfn blendHardLight3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendHardLight3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
9
|
+
},
|
|
10
|
+
dependencies: [lygia_color_blend_overlay],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default weslBundle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import lygia_color_blend_vividLight from "lygia/color/blend/vividLight";
|
|
2
|
+
|
|
3
|
+
export const weslBundle = {
|
|
4
|
+
name: "lygia",
|
|
5
|
+
edition: "unstable_2025_1",
|
|
6
|
+
modules: {
|
|
7
|
+
"color/blend/hardMix.wesl":
|
|
8
|
+
"import lygia::color::blend::vividLight::blendVividLight;\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop Hard Mix blend mode implementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendHardMix(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendHardMix(base: f32, blend: f32) -> f32 {\n return select(1.0, 0.0, blendVividLight(base, blend) < 0.5);\n}\n\nfn blendHardMix3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendHardMix(base.r, blend.r),\n blendHardMix(base.g, blend.g),\n blendHardMix(base.b, blend.b)\n );\n}\n\nfn blendHardMix3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendHardMix3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
9
|
+
},
|
|
10
|
+
dependencies: [lygia_color_blend_vividLight],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_space_rgb2hsv from "lygia/color/space/rgb2hsv";
|
|
2
|
+
import lygia_color_space_hsv2rgb from "lygia/color/space/hsv2rgb";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/hue.wesl":
|
|
9
|
+
"import lygia::color::space::{rgb2hsv::rgb2hsv, hsv2rgb::hsv2rgb};\n\n/*\ncontributors: Romain Dura\ndescription: Hue Blend mode creates the result color by combining the luminance and saturation of the base color with the hue of the blend color.\nuse: blendHue(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendHue(base: vec3f, blend: vec3f) -> vec3f {\n let baseHSV = rgb2hsv(base);\n let blendHSV = rgb2hsv(blend);\n return hsv2rgb(vec3f(blendHSV.x, baseHSV.y, baseHSV.z));\n}\n\nfn blendHueOpacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendHue(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_space_rgb2hsv, lygia_color_space_hsv2rgb],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/lighten.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Lighten blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendLighten(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendLighten(base: f32, blend: f32) -> f32 {\n return max(blend, base);\n}\n\nfn blendLighten3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendLighten(base.r, blend.r),\n blendLighten(base.g, blend.g),\n blendLighten(base.b, blend.b)\n );\n}\n\nfn blendLighten3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendLighten3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/linearBurn.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Linear Burn blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendLinearBurn(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendLinearBurn(base: f32, blend: f32) -> f32 {\n // Note: Same implementation as BlendSubtractf\n return max(base + blend - 1.0, 0.0);\n}\n\nfn blendLinearBurn3(base: vec3f, blend: vec3f) -> vec3f {\n // Note: Same implementation as BlendSubtract\n return max(base + blend - vec3f(1.0), vec3f(0.0));\n}\n\nfn blendLinearBurn3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendLinearBurn3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/linearDodge.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Linear Dodge blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendLinearDodge(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendLinearDodge(base: f32, blend: f32) -> f32 {\n // Note: Same implementation as BlendAddf\n return min(base + blend, 1.0);\n}\n\nfn blendLinearDodge3(base: vec3f, blend: vec3f) -> vec3f {\n // Note: Same implementation as BlendAdd\n return min(base + blend, vec3f(1.0));\n}\n\nfn blendLinearDodge3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendLinearDodge3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_blend_linearDodge from "lygia/color/blend/linearDodge";
|
|
2
|
+
import lygia_color_blend_linearBurn from "lygia/color/blend/linearBurn";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/linearLight.wesl":
|
|
9
|
+
"import lygia::color::blend::linearDodge::blendLinearDodge;\nimport lygia::color::blend::linearBurn::blendLinearBurn;\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop Linear Light blend mode implementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendLinearLight(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendLinearLight(base: f32, blend: f32) -> f32 {\n return select(blendLinearDodge(base, (blend - 0.5) * 2.0), blendLinearBurn(base, blend * 2.0), blend < 0.5);\n}\n\nfn blendLinearLight3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendLinearLight(base.r, blend.r),\n blendLinearLight(base.g, blend.g),\n blendLinearLight(base.b, blend.b)\n );\n}\n\nfn blendLinearLight3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendLinearLight3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_blend_linearDodge, lygia_color_blend_linearBurn],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_space_rgb2hsv from "lygia/color/space/rgb2hsv";
|
|
2
|
+
import lygia_color_space_hsv2rgb from "lygia/color/space/hsv2rgb";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/luminosity.wesl":
|
|
9
|
+
"import lygia::color::space::{rgb2hsv::rgb2hsv, hsv2rgb::hsv2rgb};\n\n/*\ncontributors: Romain Dura\ndescription: Luminosity Blend mode creates the result color by combining the hue and luminance of the base color with the saturation of the blend color.\nuse: blendLuminosity(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendLuminosity(base: vec3f, blend: vec3f) -> vec3f {\n let baseHSL = rgb2hsv(base);\n let blendHSL = rgb2hsv(blend);\n return hsv2rgb(vec3f(baseHSL.x, baseHSL.y, blendHSL.z));\n}\n\nfn blendLuminosityOpacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendLuminosity(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_space_rgb2hsv, lygia_color_space_hsv2rgb],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/multiply.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Multiply blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendMultiply(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendMultiply(base: f32, blend: f32) -> f32 {\n return base * blend;\n}\n\nfn blendMultiply3(base: vec3f, blend: vec3f) -> vec3f {\n return base * blend;\n}\n\nfn blendMultiply3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return (blendMultiply3(base, blend) * opacity + base * (1. - opacity));\n}",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/negation.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Negation blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendNegation(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendNegation(base: f32, blend: f32) -> f32 {\n return 1.0 - abs(1.0 - base - blend);\n}\n\nfn blendNegation3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(1.0) - abs(vec3f(1.0) - base - blend);\n}\n\nfn blendNegation3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendNegation3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/overlay.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Overlay blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendOverlay(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendOverlay(base: f32, blend: f32) -> f32 {\n if (base < 0.5) {\n return (2.*base*blend);\n } else {\n return (1. - 2. * (1. - base) * (1. - blend));\n }\n}\n\nfn blendOverlay3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3(blendOverlay(base.r, blend.r),\n blendOverlay(base.g, blend.g),\n blendOverlay(base.b, blend.b));\n}\n\nfn blendOverlay3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return (blendOverlay3(base, blend) * opacity + base * (1. - opacity));\n}",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/phoenix.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Phoenix blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendPhoenix(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendPhoenix(base: f32, blend: f32) -> f32 {\n return min(base, blend) - max(base, blend) + 1.0;\n}\n\nfn blendPhoenix3(base: vec3f, blend: vec3f) -> vec3f {\n return min(base, blend) - max(base, blend) + vec3f(1.0);\n}\n\nfn blendPhoenix3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendPhoenix3(base, blend) * opacity + base * (1.0 - opacity);\n}",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_blend_lighten from "lygia/color/blend/lighten";
|
|
2
|
+
import lygia_color_blend_darken from "lygia/color/blend/darken";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/pinLight.wesl":
|
|
9
|
+
"import lygia::color::blend::lighten::blendLighten;\nimport lygia::color::blend::darken::blendDarken;\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop Pin Light blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendPinLight(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendPinLight(base: f32, blend: f32) -> f32 {\n return select(blendLighten(base, (blend - 0.5) * 2.0), blendDarken(base, blend * 2.0), blend < 0.5);\n}\n\nfn blendPinLight3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendPinLight(base.r, blend.r),\n blendPinLight(base.g, blend.g),\n blendPinLight(base.b, blend.b)\n );\n}\n\nfn blendPinLight3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendPinLight3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_blend_lighten, lygia_color_blend_darken],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/reflect.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Reflect blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendReflect(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendReflect(base: f32, blend: f32) -> f32 {\n return select(min(base * base / (1.0 - blend), 1.0), blend, blend == 1.0);\n}\n\nfn blendReflect3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendReflect(base.r, blend.r),\n blendReflect(base.g, blend.g),\n blendReflect(base.b, blend.b)\n );\n}\n\nfn blendReflect3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendReflect3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_space_rgb2hsv from "lygia/color/space/rgb2hsv";
|
|
2
|
+
import lygia_color_space_hsv2rgb from "lygia/color/space/hsv2rgb";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/saturation.wesl":
|
|
9
|
+
"import lygia::color::space::{rgb2hsv::rgb2hsv, hsv2rgb::hsv2rgb};\n\n/*\ncontributors: Romain Dura\ndescription: Saturation Blend mode creates the result color by combining the hue and luminance of the base color with the saturation of the blend color.\nuse: blendSaturation(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendSaturation(base: vec3f, blend: vec3f) -> vec3f {\n let baseHSL = rgb2hsv(base);\n let blendHSL = rgb2hsv(blend);\n return hsv2rgb(vec3f(baseHSL.x, blendHSL.y, baseHSL.z));\n}\n\nfn blendSaturationOpacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendSaturation(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_space_rgb2hsv, lygia_color_space_hsv2rgb],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/screen.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Screen blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendScreen(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendScreen(base: f32, blend: f32) -> f32 {\n return 1. - ((1. - base) * (1. - blend));\n}\n\nfn blendScreen3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(blendScreen(base.r, blend.r),\n blendScreen(base.g, blend.g),\n blendScreen(base.b, blend.b));\n}\n\nfn blendScreenWithOpacity3(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return (blendScreen3(base, blend) * opacity + base * (1. - opacity));\n}",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/softLight.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Soft Light blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendSoftLight(<float|vec3> base, <float|vec3> blend [, <float> opacity])\n*/\n\nfn blendSoftLight(base: f32, blend: f32) -> f32 {\n if (blend < 0.5) {\n return (2. * base * blend + base * base * (1. - 2.*blend));\n } else {\n return (sqrt(base) * (2. * blend - 1.) + 2. * base * (1. - blend));\n }\n}\n\nfn blendSoftLight3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3(blendSoftLight(base.r, blend.r),\n blendSoftLight(base.g, blend.g),\n blendSoftLight(base.b, blend.b));\n}\n\nfn blendSoftLight4(base: vec4f, blend: vec4f) -> vec4f {\n return vec4(blendSoftLight( base.r, blend.r ),\n blendSoftLight( base.g, blend.g ),\n blendSoftLight( base.b, blend.b ),\n blendSoftLight( base.a, blend.a )\n );\n}\n\nfn blendSoftLight3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return (blendSoftLight3(base, blend) * opacity + base * (1. - opacity));\n}",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/blend/subtract.wesl":
|
|
6
|
+
"/*\ncontributors: Jamie Owen\ndescription: Photoshop Soft Light blend mode mplementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendSubtract(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendSubtract(base: f32, blend: f32) -> f32 {\n return max(base + blend - 1.0, 0.0);\n}\n\nfn blendSubtract3(base: vec3f, blend: vec3f) -> vec3f {\n return max(base + blend - vec3f(1.0), vec3f(0.0));\n}\n\nfn blendSubtract3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendSubtract3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import lygia_color_blend_colorDodge from "lygia/color/blend/colorDodge";
|
|
2
|
+
import lygia_color_blend_colorBurn from "lygia/color/blend/colorBurn";
|
|
3
|
+
|
|
4
|
+
export const weslBundle = {
|
|
5
|
+
name: "lygia",
|
|
6
|
+
edition: "unstable_2025_1",
|
|
7
|
+
modules: {
|
|
8
|
+
"color/blend/vividLight.wesl":
|
|
9
|
+
"import lygia::color::blend::colorBurn::blendColorBurn;\nimport lygia::color::blend::colorDodge::blendColorDodge;\n\n/*\ncontributors: Jamie Owen\ndescription: Photoshop Vivid Light blend mode implementations sourced from this article on https://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/\nuse: blendVividLight(<float|vec3> base, <float|vec3> blend [, <float> opacity])\nlicense: MIT License (MIT) Copyright (c) 2015 Jamie Owen\n*/\n\nfn blendVividLight(base: f32, blend: f32) -> f32 {\n return select(blendColorDodge(base, (blend - 0.5) * 2.0), blendColorBurn(base, blend * 2.0), blend < 0.5);\n}\n\nfn blendVividLight3(base: vec3f, blend: vec3f) -> vec3f {\n return vec3f(\n blendVividLight(base.r, blend.r),\n blendVividLight(base.g, blend.g),\n blendVividLight(base.b, blend.b)\n );\n}\n\nfn blendVividLight3Opacity(base: vec3f, blend: vec3f, opacity: f32) -> vec3f {\n return blendVividLight3(base, blend) * opacity + base * (1.0 - opacity);\n}\n",
|
|
10
|
+
},
|
|
11
|
+
dependencies: [lygia_color_blend_colorDodge, lygia_color_blend_colorBurn],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default weslBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const weslBundle = {
|
|
2
|
+
name: "lygia",
|
|
3
|
+
edition: "unstable_2025_1",
|
|
4
|
+
modules: {
|
|
5
|
+
"color/brightnessContrast.wesl":
|
|
6
|
+
"/*\ncontributors: Patricio Gonzalez Vivo\ndescription: Modify brightness and contrast\nuse: brightnessContrast(<float|vec3|vec4> color, <float> brightness, <float> amcontrastount)\nexamples:\n - https://raw.githubusercontent.com/patriciogonzalezvivo/lygia_examples/main/color_brightnessContrast.frag\nlicense:\n - Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0\n - Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license\n*/\n\nfn brightnessContrast(v : f32, b : f32, c : f32) -> f32 { return (v - 0.5) * c + 0.5 + b; }\n\nfn brightnessContrast3(v : vec3f, b : f32, c : f32) -> vec3f { return (v - 0.5) * c + 0.5 + b; }\n\nfn brightnessContrast4(v : vec4f, b : f32, c : f32) -> vec4f { return vec4((v.rgb - 0.5) * c + 0.5 + b, v.a); }",
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default weslBundle;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import lygia_color_space_rgb2lab from "lygia/color/space/rgb2lab";
|
|
2
|
+
import lygia_color_space_rgb2YCbCr from "lygia/color/space/rgb2YCbCr";
|
|
3
|
+
import lygia_color_space_rgb2YPbPr from "lygia/color/space/rgb2YPbPr";
|
|
4
|
+
import lygia_color_space_rgb2yuv from "lygia/color/space/rgb2yuv";
|
|
5
|
+
import lygia_color_space_rgb2oklab from "lygia/color/space/rgb2oklab";
|
|
6
|
+
|
|
7
|
+
export const weslBundle = {
|
|
8
|
+
name: "lygia",
|
|
9
|
+
edition: "unstable_2025_1",
|
|
10
|
+
modules: {
|
|
11
|
+
"color/distance.wesl":
|
|
12
|
+
"import lygia::color::space::{\n rgb2lab::rgb2lab, \n rgb2YCbCr::rgb2YCbCr, \n rgb2YPbPr::rgb2YPbPr, \n rgb2yuv::rgb2yuv, \n rgb2oklab::rgb2oklab};\n\n/*\ncontributors: Patricio Gonzalez Vivo\ndescription: Perceptual distance between two color according to CIE94 https://en.wikipedia.org/wiki/Color_difference#CIE94\nuse: colorDistance(<vec3|vec4> rgbA, <vec3|vec4> rgbA)\noptions:\n - COLORDISTANCE_FNC: |\n colorDistanceLABCIE94, colorDistanceLAB, colorDistanceYCbCr,\n colorDistanceYPbPr, colorDistanceYUV, colorDistanceOKLAB\nlicense:\n - Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0\n - Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license\n*/\n\nfn colorDistanceLABCIE94(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n let lab1 = rgb2lab(rgb1);\n let lab2 = rgb2lab(rgb2);\n\n let delta = lab1 - lab2;\n let c1 = sqrt(lab1.y * lab1.y + lab1.z * lab1.z);\n let c2 = sqrt(lab2.y * lab2.y + lab2.z * lab2.z);\n let delta_c = c1 - c2;\n var delta_h = delta.x * delta.x + delta.z * delta.z - delta_c * delta_c;\n delta_h = mix(0., sqrt(delta_h), step(0., delta_h));\n\n let sc = 1. + .045 * c1;\n let sh = 1. + .015 * c1;\n\n let delta_ckcsc = delta_c / sc;\n let delta_hkhsh = delta_h / sh;\n\n let delta_e = delta.x * delta.x + delta_ckcsc * delta_ckcsc + delta_hkhsh * delta_hkhsh;\n return mix(0., sqrt(delta_e), step(0., delta_e));\n}\n\nfn colorDistanceLAB(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n return distance(rgb2lab(rgb1), rgb2lab(rgb2));\n}\nfn colorDistanceYCbCr(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n return distance(rgb2YCbCr(rgb1).yz, rgb2YCbCr(rgb2).yz);\n}\nfn colorDistanceYPbPr(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n return distance(rgb2YPbPr(rgb1).yz, rgb2YPbPr(rgb2).yz);\n}\nfn colorDistanceYUV(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n return distance(rgb2yuv(rgb1), rgb2yuv(rgb2));\n}\nfn colorDistanceOKLAB(rgb1 : vec3<f32>, rgb2 : vec3<f32>) -> f32 {\n return distance(rgb2oklab(rgb1), rgb2oklab(rgb2));\n}\n",
|
|
13
|
+
},
|
|
14
|
+
dependencies: [
|
|
15
|
+
lygia_color_space_rgb2lab,
|
|
16
|
+
lygia_color_space_rgb2YCbCr,
|
|
17
|
+
lygia_color_space_rgb2YPbPr,
|
|
18
|
+
lygia_color_space_rgb2yuv,
|
|
19
|
+
lygia_color_space_rgb2oklab,
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default weslBundle;
|