[
  {
    "id": "audio-and-analysis/fft-band-mean",
    "name": "FFT Band Mean",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Reads the average FFT magnitude across a normalized position range of an audioFFT input using a configurable number of samples up to 64.",
    "signature": {
      "returnType": "float",
      "name": "fftBandMean",
      "parameters": "sampler2D spectrum, float start, float end, float gain, int sampleCount"
    },
    "formerIds": [
      "audio/fft-band-mean"
    ]
  },
  {
    "id": "audio-and-analysis/fft-band-peak",
    "name": "FFT Band Peak",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Reads the maximum FFT magnitude across a normalized position range of an audioFFT input using a configurable number of samples up to 64.",
    "signature": {
      "returnType": "float",
      "name": "fftBandPeak",
      "parameters": "sampler2D spectrum, float start, float end, float gain, int sampleCount"
    },
    "formerIds": [
      "audio/fft-band-peak"
    ]
  },
  {
    "id": "audio-and-analysis/fft-sample",
    "name": "FFT Sample",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Reads the FFT magnitude at a normalized position in an audioFFT input, from low to high frequencies, and scales the result to the 0–1 range.",
    "signature": {
      "returnType": "float",
      "name": "fftSample",
      "parameters": "sampler2D spectrum, float position, float gain"
    },
    "formerIds": [
      "audio/fft-sample"
    ]
  },
  {
    "id": "audio-and-analysis/horn-schunck",
    "name": "Horn-Schunck Optical Flow",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Dense optical flow estimation using the Horn-Schunck iterative method. Computes one iteration of the flow field from two consecutive frames and the previous flow estimate.",
    "signature": {
      "returnType": "vec2",
      "name": "opticalFlowHornSchunck",
      "parameters": "sampler2D previousFrame, sampler2D currentFrame, sampler2D previousFlow, vec2 uv, vec2 texelSize, float alpha, float minChange, float maxLength"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "analysis/horn-schunck"
    ]
  },
  {
    "id": "audio-and-analysis/lucas-kanade",
    "name": "Lucas-Kanade Optical Flow",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Computes optical flow using the Lucas-Kanade window-based method. Solves a local least-squares system over a (2*radius+1)² neighborhood, giving better noise robustness than a per-pixel estimator.",
    "signature": {
      "returnType": "vec2",
      "name": "lucasKanade",
      "parameters": "sampler2D current, sampler2D previous, vec2 size, vec2 uv, int radius, float minChange"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "analysis/lucas-kanade"
    ]
  },
  {
    "id": "audio-and-analysis/motion-vector",
    "name": "Motion Vector (Per-Pixel)",
    "family": "audio-and-analysis",
    "mode": "fragment",
    "description": "Estimates a motion vector by solving the optical flow constraint equation at a single pixel. Equivalent to a 1×1 Lucas-Kanade window — faster but more sensitive to noise than the windowed version.",
    "signature": {
      "returnType": "vec2",
      "name": "motionVector",
      "parameters": "sampler2D current, sampler2D previous, vec2 size, vec2 uv"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "analysis/motion-vector"
    ]
  },
  {
    "id": "color/black-body-palette",
    "name": "Black Body Palette",
    "family": "color",
    "mode": "fragment",
    "description": "Generates a pseudo black body map color based on a normalized input value.",
    "signature": {
      "returnType": "vec3",
      "name": "blackbodyPalette",
      "parameters": "float t"
    }
  },
  {
    "id": "color/blend/apply-blend-opacity",
    "name": "Apply Blend Opacity",
    "family": "color",
    "mode": "fragment",
    "description": "Applies blend opacity to a base image, blend image and the blended color result.",
    "signature": {
      "returnType": "vec4",
      "name": "applyBlendOpacity",
      "parameters": "vec4 base, vec4 blend, vec4 blended, float opacity"
    },
    "formerIds": [
      "blend/apply-blend-opacity"
    ]
  },
  {
    "id": "color/blend/arithmetic/add",
    "name": "Add",
    "family": "color",
    "mode": "fragment",
    "description": "Brightens images by adding color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendAdd",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/add",
      "blend/arithmetic/add"
    ]
  },
  {
    "id": "color/blend/arithmetic/average",
    "name": "Average",
    "family": "color",
    "mode": "fragment",
    "description": "Blends the base and blend colors by averaging their values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendAverage",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/arithmetic/average",
      "blend/average"
    ]
  },
  {
    "id": "color/blend/arithmetic/divide",
    "name": "Divide",
    "family": "color",
    "mode": "fragment",
    "description": "Lightens the base color by dividing it by the blend color.",
    "signature": {
      "returnType": "vec4",
      "name": "blendDivide",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/safe-divide",
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/arithmetic/divide",
      "blend/divide"
    ]
  },
  {
    "id": "color/blend/arithmetic/subtract",
    "name": "Subtract",
    "family": "color",
    "mode": "fragment",
    "description": "Subtracts blend color values from the base color.",
    "signature": {
      "returnType": "vec4",
      "name": "blendSubtract",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/arithmetic/subtract",
      "blend/subtract"
    ]
  },
  {
    "id": "color/blend/contrast/hard-light",
    "name": "Hard Light",
    "family": "color",
    "mode": "fragment",
    "description": "Overlay blend with the blend layer controlling the operation.",
    "signature": {
      "returnType": "vec4",
      "name": "blendHardLight",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/hard-light",
      "blend/hard-light"
    ]
  },
  {
    "id": "color/blend/contrast/hard-mix",
    "name": "Hard Mix",
    "family": "color",
    "mode": "fragment",
    "description": "Reduces Vivid Light output into binary color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendHardMix",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "color/blend/contrast/vivid-light"
    ],
    "formerIds": [
      "blend/contrast/hard-mix",
      "blend/hard-mix"
    ]
  },
  {
    "id": "color/blend/contrast/linear-light",
    "name": "Linear Light",
    "family": "color",
    "mode": "fragment",
    "description": "Combines Linear Dodge and Linear Burn to increase contrast.",
    "signature": {
      "returnType": "vec4",
      "name": "blendLinearLight",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/linear-light",
      "blend/linear-light"
    ]
  },
  {
    "id": "color/blend/contrast/overlay",
    "name": "Overlay",
    "family": "color",
    "mode": "fragment",
    "description": "Combines multiply and screen blend depending on the base luminance.",
    "signature": {
      "returnType": "vec4",
      "name": "blendOverlay",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/overlay",
      "blend/overlay"
    ]
  },
  {
    "id": "color/blend/contrast/pin-light",
    "name": "Pin Light",
    "family": "color",
    "mode": "fragment",
    "description": "Replaces colors depending on the blend intensity.",
    "signature": {
      "returnType": "vec4",
      "name": "blendPinLight",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/pin-light",
      "blend/pin-light"
    ]
  },
  {
    "id": "color/blend/contrast/soft-light",
    "name": "Soft Light",
    "family": "color",
    "mode": "fragment",
    "description": "Soft contrast enhancement using blend layer influence.",
    "signature": {
      "returnType": "vec4",
      "name": "blendSoftLight",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/soft-light",
      "blend/soft-light"
    ]
  },
  {
    "id": "color/blend/contrast/vivid-light",
    "name": "Vivid Light",
    "family": "color",
    "mode": "fragment",
    "description": "Applies Color Dodge or Color Burn depending on the blend value.",
    "signature": {
      "returnType": "vec4",
      "name": "blendVividLight",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "color/blend/lighten/color-dodge",
      "color/blend/darken/color-burn",
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/contrast/vivid-light",
      "blend/vivid-light"
    ]
  },
  {
    "id": "color/blend/darken/color-burn",
    "name": "Color Burn",
    "family": "color",
    "mode": "fragment",
    "description": "Darkens the base color by increasing contrast toward black.",
    "signature": {
      "returnType": "vec4",
      "name": "blendColorBurn",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/safe-divide",
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/color-burn",
      "blend/darken/color-burn"
    ]
  },
  {
    "id": "color/blend/darken/darken",
    "name": "Darken",
    "family": "color",
    "mode": "fragment",
    "description": "Darken blend mode for combining base and blend color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendDarken",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/darken",
      "blend/darken/darken"
    ]
  },
  {
    "id": "color/blend/darken/linear-burn",
    "name": "Linear Burn",
    "family": "color",
    "mode": "fragment",
    "description": "Darkens the base color by subtracting brightness from the combined colors.",
    "signature": {
      "returnType": "vec4",
      "name": "blendLinearBurn",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/darken/linear-burn",
      "blend/linear-burn"
    ]
  },
  {
    "id": "color/blend/darken/multiply",
    "name": "Multiply",
    "family": "color",
    "mode": "fragment",
    "description": "Multiplies two colors together, producing a darker result.",
    "signature": {
      "returnType": "vec4",
      "name": "blendMultiply",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/darken/multiply",
      "blend/multiply"
    ]
  },
  {
    "id": "color/blend/difference/difference",
    "name": "Difference",
    "family": "color",
    "mode": "fragment",
    "description": "Calculates the absolute difference between the base and blend color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendDifference",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/difference",
      "blend/difference/difference"
    ]
  },
  {
    "id": "color/blend/difference/exclusion",
    "name": "Exclusion",
    "family": "color",
    "mode": "fragment",
    "description": "Exclusion blend mode for combining base and blend color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendExclusion",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/difference/exclusion",
      "blend/exclusion"
    ]
  },
  {
    "id": "color/blend/difference/negation",
    "name": "Negation",
    "family": "color",
    "mode": "fragment",
    "description": "Creates an effect similar to Difference with softer contrast.",
    "signature": {
      "returnType": "vec4",
      "name": "blendNegation",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/difference/negation",
      "blend/negation"
    ]
  },
  {
    "id": "color/blend/difference/phoenix",
    "name": "Phoenix",
    "family": "color",
    "mode": "fragment",
    "description": "Creates a high-contrast blend by subtracting the larger color from the smaller and adding one.",
    "signature": {
      "returnType": "vec4",
      "name": "blendPhoenix",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/difference/phoenix",
      "blend/phoenix"
    ]
  },
  {
    "id": "color/blend/lighten/color-dodge",
    "name": "Color Dodge",
    "family": "color",
    "mode": "fragment",
    "description": "Brightens the base color by increasing contrast toward white.",
    "signature": {
      "returnType": "vec4",
      "name": "blendColorDodge",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/safe-divide",
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/color-dodge",
      "blend/lighten/color-dodge"
    ]
  },
  {
    "id": "color/blend/lighten/lighten",
    "name": "Lighten",
    "family": "color",
    "mode": "fragment",
    "description": "Lighten blend mode for combining base and blend color values.",
    "signature": {
      "returnType": "vec4",
      "name": "blendLighten",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/lighten",
      "blend/lighten/lighten"
    ]
  },
  {
    "id": "color/blend/lighten/linear-dodge",
    "name": "Linear Dodge",
    "family": "color",
    "mode": "fragment",
    "description": "Brightens the base color by adding the blend color.",
    "signature": {
      "returnType": "vec4",
      "name": "blendLinearDodge",
      "parameters": "vec4 base, vec4 blend"
    },
    "dependencies": [
      "math/normalized-clamp"
    ],
    "formerIds": [
      "blend/lighten/linear-dodge",
      "blend/linear-dodge"
    ]
  },
  {
    "id": "color/blend/lighten/screen",
    "name": "Screen",
    "family": "color",
    "mode": "fragment",
    "description": "Brightens images by inverting, multiplying, and inverting again.",
    "signature": {
      "returnType": "vec4",
      "name": "blendScreen",
      "parameters": "vec4 base, vec4 blend"
    },
    "formerIds": [
      "blend/lighten/screen",
      "blend/screen"
    ]
  },
  {
    "id": "color/blend/smooth-clamp",
    "name": "Smooth Clamp",
    "family": "color",
    "mode": "fragment",
    "description": "Soft version of clamp(x, a, b), built by composing Smooth Min and Smooth Max with a fixed blend width. Constrains a value into [a, b] without the hard break of a regular clamp — handy for animation or shaping parameters rather than raw SDF distances.",
    "signature": {
      "returnType": "float",
      "name": "sclamp",
      "parameters": "float x, float a, float b, float smoothness"
    },
    "dependencies": [
      "color/blend/smooth-min",
      "color/blend/smooth-max"
    ],
    "formerIds": [
      "math/blend/smooth-clamp"
    ]
  },
  {
    "id": "color/blend/smooth-clamp-cubic",
    "name": "Smooth Clamp Cubic",
    "family": "color",
    "mode": "fragment",
    "description": "Cubic variant of Smooth Clamp. Composes Smooth Min Cubic and Smooth Max Cubic to create a soft clamp with a wider, softer blend region than the standard quadratic version.",
    "signature": {
      "returnType": "float",
      "name": "sclamp3",
      "parameters": "float x, float a, float b, float smoothness"
    },
    "dependencies": [
      "color/blend/smooth-min-cubic",
      "color/blend/smooth-max-cubic"
    ],
    "formerIds": [
      "math/blend/smooth-clamp-cubic"
    ]
  },
  {
    "id": "color/blend/smooth-max",
    "name": "Smooth Max",
    "family": "color",
    "mode": "fragment",
    "description": "Computes the smooth maximum of two values. Inverse of Smooth Min — used to carve or subtract one shape from another while keeping a continuous, non-hard-edged seam.",
    "signature": {
      "returnType": "float",
      "name": "smax",
      "parameters": "float a, float b, float smoothness"
    },
    "formerIds": [
      "math/blend/smooth-max"
    ]
  },
  {
    "id": "color/blend/smooth-max-cubic",
    "name": "Smooth Max Cubic",
    "family": "color",
    "mode": "fragment",
    "description": "Cubic variant of Smooth Max. Wider, softer blend region than the standard quadratic version, at a slightly higher cost — useful when the quadratic blend still leaves a visible crease at the seam.",
    "signature": {
      "returnType": "float",
      "name": "smax3",
      "parameters": "float a, float b, float k"
    },
    "formerIds": [
      "math/blend/smooth-max-cubic"
    ]
  },
  {
    "id": "color/blend/smooth-min",
    "name": "Smooth Min",
    "family": "color",
    "mode": "fragment",
    "description": "Computes the smooth minimum of two values.",
    "signature": {
      "returnType": "float",
      "name": "smin",
      "parameters": "float a, float b, float smoothness"
    },
    "formerIds": [
      "math/blend/smooth-min",
      "math/smooth-min"
    ]
  },
  {
    "id": "color/blend/smooth-min-cubic",
    "name": "Smooth Min Cubic",
    "family": "color",
    "mode": "fragment",
    "description": "Cubic variant of Smooth Min. Wider, softer blend region than the standard quadratic version, at a slightly higher cost — useful when the quadratic blend still leaves a visible crease at the seam.",
    "signature": {
      "returnType": "float",
      "name": "smin3",
      "parameters": "float a, float b, float k"
    },
    "formerIds": [
      "math/blend/smooth-min-cubic"
    ]
  },
  {
    "id": "color/compositing/alpha-mask",
    "name": "Alpha Mask",
    "family": "color",
    "mode": "fragment",
    "description": "Applies an alpha mask to an image, multiplying the image's alpha by the mask's alpha.",
    "signature": {
      "returnType": "vec4",
      "name": "alphaMask",
      "parameters": "vec4 foreground, vec4 mask"
    },
    "formerIds": [
      "compositing/alpha-mask"
    ]
  },
  {
    "id": "color/compositing/alpha-over",
    "name": "Alpha Over",
    "family": "color",
    "mode": "fragment",
    "description": "Performs an alpha over compositing operation between a background and a foreground color.",
    "signature": {
      "returnType": "vec4",
      "name": "alphaOver",
      "parameters": "vec4 background, vec4 foreground"
    },
    "formerIds": [
      "compositing/alpha-over"
    ]
  },
  {
    "id": "color/compositing/depth-over",
    "name": "Depth Over",
    "family": "color",
    "mode": "fragment",
    "description": "Composites straight-alpha layers with larger depth nearer the viewer. Returns color and outputs the nearest nontransparent depth. Transparent layers do not occlude. Supports two surface samples, not arbitrary order-independent translucent volumes.",
    "signature": {
      "returnType": "vec4",
      "name": "depthOver",
      "parameters": "vec4 background, float backgroundDepth, vec4 foreground, float foregroundDepth, out float depth"
    },
    "dependencies": [
      "color/compositing/alpha-over"
    ],
    "formerIds": [
      "compositing/depth-over"
    ]
  },
  {
    "id": "color/compositing/luma-mask",
    "name": "Luma Mask",
    "family": "color",
    "mode": "fragment",
    "description": "Applies a luma mask to an image, multiplying the image's alpha by the luminance of the mask.",
    "signature": {
      "returnType": "vec4",
      "name": "lumaMask",
      "parameters": "vec4 foreground, vec4 mask"
    },
    "formerIds": [
      "compositing/luma-mask"
    ]
  },
  {
    "id": "color/compositing/merge-channels",
    "name": "Merge Channels",
    "family": "color",
    "mode": "fragment",
    "description": "Takes the red of the first image, the green of the second and the blue of the third, each weighted by its own alpha, with the largest of the three alphas. Three copies of an image moved a little apart, merged, make a chromatic split.",
    "signature": {
      "returnType": "vec4",
      "name": "mergeChannels",
      "parameters": "vec4 red, vec4 green, vec4 blue"
    }
  },
  {
    "id": "color/contrast",
    "name": "Contrast",
    "family": "color",
    "mode": "fragment",
    "description": "Scales the contrast of a color around a pivot value.",
    "signature": {
      "returnType": "vec3",
      "name": "adjustContrast",
      "parameters": "vec3 color, float amount, float pivot"
    }
  },
  {
    "id": "color/cosine-palette",
    "name": "Cosine Palette",
    "family": "color",
    "mode": "fragment",
    "description": "Procedural color palette defined by four vectors: a + b * cos(2π(c * t + d)).",
    "signature": {
      "returnType": "vec3",
      "name": "cosinePalette",
      "parameters": "float t, vec3 offset, vec3 amplitude, vec3 frequency, vec3 phase"
    }
  },
  {
    "id": "color/cosine-palette-helper",
    "name": "Cosine Palette Helper",
    "family": "color",
    "mode": "fragment",
    "description": "Helper function for generating a cosine palette with alpha based on a rectangle SDF.",
    "signature": {
      "returnType": "vec4",
      "name": "cosinePaletteHelper",
      "parameters": "vec2 p, vec2 halfSize, vec2 viewportSize, vec3 offset, vec3 amplitude, vec3 frequency, vec3 phase"
    },
    "dependencies": [
      "shapes/2d/rectangle",
      "shapes/rendering/fill-mask",
      "color/cosine-palette",
      "space-and-camera/coordinates/pixel-size"
    ]
  },
  {
    "id": "color/gamma",
    "name": "Gamma",
    "family": "color",
    "mode": "fragment",
    "description": "Applies a gamma curve to a color. Values above 1 brighten the midtones, values below 1 darken them.",
    "signature": {
      "returnType": "vec3",
      "name": "adjustGamma",
      "parameters": "vec3 color, float gamma"
    }
  },
  {
    "id": "color/heat-palette",
    "name": "Heat Palette",
    "family": "color",
    "mode": "fragment",
    "description": "Generates a heat map color based on a normalized input value.",
    "signature": {
      "returnType": "vec3",
      "name": "heatPalette",
      "parameters": "float x"
    }
  },
  {
    "id": "color/hsl-to-rgb",
    "name": "HSL to RGB",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an HSL color to RGB. Hue wraps around, so any value is valid.",
    "signature": {
      "returnType": "vec3",
      "name": "hslToRgb",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/hsv-to-rgb",
    "name": "HSV to RGB",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an HSV color to RGB. Hue wraps around, so any value is valid.",
    "signature": {
      "returnType": "vec3",
      "name": "hsvToRgb",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/linear-gradient",
    "name": "Linear Color Gradient",
    "family": "color",
    "mode": "fragment",
    "description": "Interpolates between two colors along a linear gradient defined by start and end points.",
    "signature": {
      "returnType": "vec3",
      "name": "linearColorGradient",
      "parameters": "vec2 uv, vec2 startPoint, vec2 endPoint, vec3 startColor, vec3 endColor"
    }
  },
  {
    "id": "color/linear-srgb-to-oklab",
    "name": "Linear sRGB to Oklab",
    "family": "color",
    "mode": "fragment",
    "description": "Converts a linear sRGB color to Oklab, a perceptual color space well suited to gradients and blending.",
    "signature": {
      "returnType": "vec3",
      "name": "linearSrgbToOklab",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/linear-to-srgb",
    "name": "Linear to sRGB",
    "family": "color",
    "mode": "fragment",
    "description": "Encodes a linear-light color to sRGB (gamma-encoded) using the exact sRGB transfer function.",
    "signature": {
      "returnType": "vec3",
      "name": "linearToSrgb",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/luminance",
    "name": "Luminance",
    "family": "color",
    "mode": "fragment",
    "description": "Computes the luminance of an RGB color using Rec. 709 weights. Physically accurate on linear-light colors, a luma approximation on sRGB-encoded ones.",
    "signature": {
      "returnType": "float",
      "name": "luminance",
      "parameters": "vec3 rgb"
    }
  },
  {
    "id": "color/oklab-to-linear-srgb",
    "name": "Oklab to Linear sRGB",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an Oklab color back to linear sRGB. The result can be out of gamut and may need clamping.",
    "signature": {
      "returnType": "vec3",
      "name": "oklabToLinearSrgb",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/radial-gradient",
    "name": "Radial Color Gradient",
    "family": "color",
    "mode": "fragment",
    "description": "Interpolates from innerColor at center to outerColor at radius and beyond, with a smooth falloff (the same space as uv). Use it for a glow behind a subject, or for a background that is lit from its middle.",
    "signature": {
      "returnType": "vec3",
      "name": "radialColorGradient",
      "parameters": "vec2 uv, vec2 center, float radius, vec3 innerColor, vec3 outerColor"
    }
  },
  {
    "id": "color/rgb-to-hsl",
    "name": "RGB to HSL",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an RGB color to HSL. Hue, saturation and lightness are all between 0 and 1.",
    "signature": {
      "returnType": "vec3",
      "name": "rgbToHsl",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/rgb-to-hsv",
    "name": "RGB to HSV",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an RGB color to HSV. Hue, saturation and value are all between 0 and 1.",
    "signature": {
      "returnType": "vec3",
      "name": "rgbToHsv",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/rgb-to-ycbcr-bt601",
    "name": "RGB to YCbCr (BT.601)",
    "family": "color",
    "mode": "fragment",
    "description": "Converts an RGB color to full-range BT.601 (SD video) YCbCr, with chroma centered on 0.5.",
    "signature": {
      "returnType": "vec3",
      "name": "rgbToYcbcrBt601",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/saturation",
    "name": "Saturation",
    "family": "color",
    "mode": "fragment",
    "description": "Scales the saturation of a color by blending between its luminance (grayscale) and the original color.",
    "signature": {
      "returnType": "vec3",
      "name": "adjustSaturation",
      "parameters": "vec3 color, float amount"
    },
    "dependencies": [
      "color/luminance"
    ]
  },
  {
    "id": "color/soft-background",
    "name": "Soft Background",
    "family": "color",
    "mode": "fragment",
    "description": "A background that is not flat: a diagonal gradient from topColor to bottomColor, a soft glow of glowColor around glowAt, edges a little darker, and a dither so that it shows no bands. uv is the centered uv of the screen (see Centered Aspect UV), coord the uv from 0 to 1 and viewportSize the size in pixels. Returns a color: make it opaque and put what you draw over it.",
    "signature": {
      "returnType": "vec3",
      "name": "softBackground",
      "parameters": "vec2 uv, vec2 coord, vec2 viewportSize, vec2 glowAt, vec3 topColor, vec3 bottomColor, vec3 glowColor"
    },
    "dependencies": [
      "color/linear-gradient",
      "color/radial-gradient",
      "image-and-filters/post-processing/vignette",
      "image-and-filters/post-processing/dither"
    ]
  },
  {
    "id": "color/srgb-to-linear",
    "name": "sRGB to Linear",
    "family": "color",
    "mode": "fragment",
    "description": "Decodes an sRGB (gamma-encoded) color to linear light using the exact sRGB transfer function.",
    "signature": {
      "returnType": "vec3",
      "name": "srgbToLinear",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "color/viridis-palette",
    "name": "Viridis Palette",
    "family": "color",
    "mode": "fragment",
    "description": "Generates a pseudo-viridis map color based on a normalized input value.",
    "signature": {
      "returnType": "vec3",
      "name": "viridisPalette",
      "parameters": "float t"
    }
  },
  {
    "id": "color/ycbcr-bt601-to-rgb",
    "name": "YCbCr (BT.601) to RGB",
    "family": "color",
    "mode": "fragment",
    "description": "Converts a full-range BT.601 (SD video) YCbCr color back to RGB.",
    "signature": {
      "returnType": "vec3",
      "name": "ycbcrBt601ToRgb",
      "parameters": "vec3 color"
    }
  },
  {
    "id": "image-and-filters/blur/disc-blur",
    "name": "Disc Blur",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Blurs an image with 32 reads laid out in a spiral over a disc, and averages them. The radius is a fraction of the picture height (0.02 is a soft blur, 0.1 a strong one), so the blur is round whatever the shape of the picture. A fixed number of reads, so the cost does not depend on the radius: a large radius shows the reads as a fine pattern (follow it with Film Grain, or use a smaller radius).",
    "signature": {
      "returnType": "vec4",
      "name": "discBlur",
      "parameters": "sampler2D image, vec2 uv, vec2 resolution, float radius"
    }
  },
  {
    "id": "image-and-filters/edges/canny",
    "name": "Canny Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Canny edge detector in one pass: the brightness is smoothed by a small Gaussian, its gradient is taken with Sobel, the edges are thinned to one pixel (non-maximum suppression along the direction of the gradient) and kept by a double threshold with hysteresis: a gradient above the threshold is an edge, one between half of it and the threshold is an edge only when it touches a strong one. It answers 1 on an edge and 0 elsewhere. It reads 49 pixels around each one, so it costs more than Sobel, and it reads the brightness only, not the alpha.",
    "signature": {
      "returnType": "float",
      "name": "cannyEdge",
      "parameters": "sampler2D tex, vec2 uv, vec2 resolution, float threshold"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/canny"
    ]
  },
  {
    "id": "image-and-filters/edges/laplacian",
    "name": "Laplacian Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Detects edges using the second derivative of image intensity with the Laplacian operator.",
    "signature": {
      "returnType": "float",
      "name": "laplacian",
      "parameters": "vec2 uv, vec2 resolution, sampler2D image"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/laplacian"
    ]
  },
  {
    "id": "image-and-filters/edges/outline",
    "name": "Outline",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Creates an outline effect by detecting local intensity differences around pixels.",
    "signature": {
      "returnType": "float",
      "name": "outline",
      "parameters": "vec2 uv, vec2 resolution, sampler2D image, float threshold"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/outline"
    ]
  },
  {
    "id": "image-and-filters/edges/prewitt",
    "name": "Prewitt Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Detects horizontal and vertical edges using the Prewitt gradient operator.",
    "signature": {
      "returnType": "float",
      "name": "prewitt",
      "parameters": "vec2 uv, vec2 resolution, sampler2D image"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/prewitt"
    ]
  },
  {
    "id": "image-and-filters/edges/roberts-cross",
    "name": "Roberts Cross Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Detects diagonal edges using the Roberts Cross gradient operator.",
    "signature": {
      "returnType": "float",
      "name": "robertsCross",
      "parameters": "vec2 uv, vec2 resolution, sampler2D image"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/roberts-cross"
    ]
  },
  {
    "id": "image-and-filters/edges/scharr",
    "name": "Scharr Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Detects image edges using the Scharr gradient operator. Provides better rotational accuracy than Sobel.",
    "signature": {
      "returnType": "float",
      "name": "scharr",
      "parameters": "vec2 uv, vec2 resolution, sampler2D image"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/scharr"
    ]
  },
  {
    "id": "image-and-filters/edges/sobel",
    "name": "Sobel Edge Detection",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Detects image edges using the Sobel gradient operator by computing image intensity gradients.",
    "signature": {
      "returnType": "float",
      "name": "sobel",
      "parameters": "sampler2D image, vec2 uv, vec2 resolution"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "edges/sobel"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-beat",
    "name": "Glitch Beat",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "The clock of the glitch snippets: 1 on the beats where the glitch is on, 0 on the others. There are rate beats a second; burst (0 to 1) is how often a beat is on. The other glitch snippets read it themselves: give them the same time, rate and burst and they glitch together.",
    "signature": {
      "returnType": "float",
      "name": "glitchBeat",
      "parameters": "float time, float rate, float burst"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-11"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-blocks",
    "name": "Glitch Blocks",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Cuts the picture in a grid of blocks (blocks of them across and down, in the space of uv) and, on the beats that are on, moves some of them in a random direction by up to amount: the blocky corruption of a bad video stream. Returns the uv to read the picture at.",
    "signature": {
      "returnType": "vec2",
      "name": "glitchBlocks",
      "parameters": "vec2 uv, vec2 blocks, float time, float rate, float amount, float burst"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-12"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-flash",
    "name": "Glitch Flash",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "A strobe: 1 on some of the beats that are on (chance, 0 to 1, says how many), 0 elsewhere. Mix a color with its inverse by it, or add it to the picture, for the flash that goes with a glitch.",
    "signature": {
      "returnType": "float",
      "name": "glitchFlash",
      "parameters": "float time, float rate, float burst, float chance"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-11"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-jitter",
    "name": "Glitch Jitter",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Shakes the whole picture: on each beat that is on it is moved in a random direction by up to amount. Returns the uv to read the picture at.",
    "signature": {
      "returnType": "vec2",
      "name": "glitchJitter",
      "parameters": "vec2 uv, float time, float rate, float amount, float burst"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-12"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-rgb-split",
    "name": "Glitch RGB Split",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Reads an image three times, the red channel at coord - offset, the green at coord and the blue at coord + offset (in texture coordinates), and merges them: a chromatic split. Give offset the jump of a glitch to split the colors on the beats. To split something that is not an image, make three copies of it and use Merge Channels.",
    "signature": {
      "returnType": "vec4",
      "name": "glitchRgbSplit",
      "parameters": "sampler2D image, vec2 coord, vec2 offset"
    },
    "dependencies": [
      "color/compositing/merge-channels"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-slices",
    "name": "Glitch Slices",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Cuts the picture in horizontal slices (rows of them over a y that goes from 0 to 1) and, on the beats that are on, makes some of them jump sideways by up to amount. Returns the uv to read the picture at. Give y the uv.y of the screen, or the position in a box to cut a title and nothing around it.",
    "signature": {
      "returnType": "vec2",
      "name": "glitchSlices",
      "parameters": "vec2 uv, float y, float rows, float time, float rate, float amount, float burst"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-12"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-static",
    "name": "Glitch Static",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Digital noise: on the beats that are on, some blocks of a grid (blocks of them across and down, in the space of uv) are replaced by a random gray, up to amount (0 to 1).",
    "signature": {
      "returnType": "vec3",
      "name": "glitchStatic",
      "parameters": "vec3 color, vec2 uv, vec2 blocks, float time, float rate, float amount, float burst"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-12"
    ]
  },
  {
    "id": "image-and-filters/glitch/glitch-tear",
    "name": "Glitch Tear",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "A band of the picture, height high, at a new place (y from 0 to 1) on each beat that is on, that is pushed sideways by amount and wobbles: the tracking error of a worn tape. Returns the uv to read the picture at.",
    "signature": {
      "returnType": "vec2",
      "name": "glitchTear",
      "parameters": "vec2 uv, float y, float time, float rate, float amount, float height, float burst"
    },
    "dependencies": [
      "image-and-filters/glitch/glitch-beat",
      "noise-and-patterns/noise/hash-11"
    ]
  },
  {
    "id": "image-and-filters/grain/grain-apply",
    "name": "Grain Apply",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Puts a grain (from Grain Noise, Grain Layers or Grain From Texture) on a color. Amount is the strength. Chroma goes from a grain without color (0) to one grain for each of red, green and blue (1, give three grains with different seeds). Response sets the strength in the blacks, the mid-tones and the whites. Mode is add, overlay or soft light: the last two leave the pure blacks and whites alone. Put it last in a chain of effects.",
    "signature": {
      "returnType": "vec3",
      "name": "grainApply",
      "parameters": "vec3 color, vec3 grain, float amount, float chroma, vec3 response, float mode"
    }
  },
  {
    "id": "image-and-filters/grain/grain-from-texture",
    "name": "Grain From Texture",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "A grain read from a picture of grain (mid-gray is no grain, lighter and darker are the specks), repeated over the window with scale copies in its height. rotation turns it, and each time it is drawn again (rate per second) it is moved and turned at random by jitter, so its pattern is never seen twice in a row. tileFade fades the edges of the picture to hide the seams of a picture not made to repeat (see Sample Tileable); contrast strengthens the specks. Without a picture (less than 2 pixels) the grain is 0. Returns a number from -1 to 1, to give to Grain Apply.",
    "signature": {
      "returnType": "float",
      "name": "grainFromTexture",
      "parameters": "sampler2D grainTex, vec2 textureSize, vec2 uv, vec2 resolution, float time, float scale, float rotation, float rate, float jitter, float tileFade, float contrast"
    },
    "dependencies": [
      "image-and-filters/sampling/sample-tileable"
    ]
  },
  {
    "id": "image-and-filters/grain/grain-layers",
    "name": "Grain Layers",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "A grain made of a fine layer and a coarse one that can be stretched, so it does not look like plain white noise. coarseMix is how much of the coarse layer there is, and stretch makes its grains longer across or down: (4, 1) gives horizontal streaks, like scratches or a worn film. Softness, distribution, rate and seed work as in Grain Noise. Returns a number from -1 to 1, to give to Grain Apply.",
    "signature": {
      "returnType": "float",
      "name": "grainLayers",
      "parameters": "vec2 uv, vec2 resolution, float time, float fineSize, float coarseSize, float coarseMix, vec2 stretch, float softness, float distribution, float rate, float seed"
    },
    "dependencies": [
      "image-and-filters/grain/grain-noise"
    ]
  },
  {
    "id": "image-and-filters/grain/grain-noise",
    "name": "Grain Noise",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "The grain alone, a number from -1 to 1 at a point, to use as you like: put it on a color with Grain Apply, add it to a mask, or move an edge with it. size is the width of a grain in pixels, rate how many times a second it is drawn again (0 keeps it still), seed gives another grain. softness goes from hard square grains (0) to soft ones that melt into one another (1): soft grains are weaker, so raise the amount you apply. distribution goes from an even spread (0) to a bell-like one (1) with few strong grains, closer to real film.",
    "signature": {
      "returnType": "float",
      "name": "grainNoise",
      "parameters": "vec2 uv, vec2 resolution, float time, float size, float rate, float seed, float softness, float distribution"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-13"
    ]
  },
  {
    "id": "image-and-filters/kernels/bicubic",
    "name": "Bicubic Interpolation",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "High quality 4x4 texture reconstruction filter for smooth image scaling.",
    "signature": {
      "returnType": "vec4",
      "name": "bicubic",
      "parameters": "sampler2D tex, vec2 uv, vec2 texSize"
    },
    "dependencies": [
      "image-and-filters/kernels/cubic"
    ],
    "formerIds": [
      "image-sampling/kernels/bicubic",
      "image/kernels/bicubic",
      "kernels/bicubic"
    ]
  },
  {
    "id": "image-and-filters/kernels/bilinear",
    "name": "Bilinear Interpolation",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Basic smooth texture interpolation for image enlargement.",
    "signature": {
      "returnType": "vec4",
      "name": "bilinear",
      "parameters": "vec4 c00, vec4 c10, vec4 c01, vec4 c11, vec2 f"
    },
    "formerIds": [
      "image-sampling/kernels/bilinear",
      "image/kernels/bilinear",
      "kernels/bilinear"
    ]
  },
  {
    "id": "image-and-filters/kernels/catmull-rom",
    "name": "Catmull-Rom Interpolation",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Sharp bicubic reconstruction filter preserving image details.",
    "signature": {
      "returnType": "float",
      "name": "catmullRom",
      "parameters": "float x"
    },
    "formerIds": [
      "image-sampling/kernels/catmull-rom",
      "image/kernels/catmull-rom",
      "kernels/catmull-rom"
    ]
  },
  {
    "id": "image-and-filters/kernels/cubic",
    "name": "Cubic Interpolation",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Cubic interpolation kernel used for smooth curve reconstruction and filtering.",
    "signature": {
      "returnType": "float",
      "name": "cubicKernel",
      "parameters": "float x"
    },
    "formerIds": [
      "image-sampling/kernels/cubic",
      "image/kernels/cubic",
      "math/cubic-kernel"
    ]
  },
  {
    "id": "image-and-filters/kernels/gaussian",
    "name": "Gaussian Filter",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Smooth Gaussian reconstruction kernel for soft image scaling and blur operations.",
    "signature": {
      "returnType": "float",
      "name": "gaussian",
      "parameters": "float x, float sigma"
    },
    "formerIds": [
      "image-sampling/kernels/gaussian",
      "image/kernels/gaussian",
      "kernels/gaussian"
    ]
  },
  {
    "id": "image-and-filters/kernels/lanczos",
    "name": "Lanczos Kernel",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Windowed sinc kernel used for high quality image reconstruction.",
    "signature": {
      "returnType": "float",
      "name": "lanczos",
      "parameters": "float x, float radius"
    },
    "dependencies": [
      "math/sinc"
    ],
    "formerIds": [
      "image-sampling/kernels/lanczos",
      "image/kernels/lanczos",
      "kernels/lanczos"
    ]
  },
  {
    "id": "image-and-filters/kernels/mitchell-netravali",
    "name": "Mitchell-Netravali Kernel",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Mitchell-Netravali bicubic reconstruction kernel.",
    "signature": {
      "returnType": "float",
      "name": "mitchellNetravali",
      "parameters": "float x"
    },
    "formerIds": [
      "image-sampling/kernels/mitchell-netravali",
      "image/kernels/mitchell-netravali",
      "kernels/mitchell-netravali"
    ]
  },
  {
    "id": "image-and-filters/morphology/dilate-cross",
    "name": "Dilate Cross",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological dilation with a cross-shaped kernel (horizontal and vertical arms). Radius in pixels, up to 32.",
    "signature": {
      "returnType": "vec4",
      "name": "dilateCross",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "dependencies": [
      "image-and-filters/morphology/dilate-horizontal",
      "image-and-filters/morphology/dilate-vertical"
    ],
    "formerIds": [
      "image/morphology/dilate-cross"
    ]
  },
  {
    "id": "image-and-filters/morphology/dilate-disc",
    "name": "Dilate Disc",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological dilation with a circular kernel: per-channel maximum over a disc. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "dilateDisc",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/dilate-disc"
    ]
  },
  {
    "id": "image-and-filters/morphology/dilate-horizontal",
    "name": "Dilate Horizontal",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "One-dimensional horizontal dilation (maximum along X). Radius in pixels, up to 32. Chain with Dilate Vertical in a second pass for a cheap separable square dilation.",
    "signature": {
      "returnType": "vec4",
      "name": "dilateHorizontal",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/dilate-horizontal"
    ]
  },
  {
    "id": "image-and-filters/morphology/dilate-square",
    "name": "Dilate Square",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological dilation with a square kernel: per-channel maximum over the neighborhood. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "dilateSquare",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/dilate-square"
    ]
  },
  {
    "id": "image-and-filters/morphology/dilate-vertical",
    "name": "Dilate Vertical",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "One-dimensional vertical dilation (maximum along Y). Radius in pixels, up to 32. Chain after Dilate Horizontal for a cheap separable square dilation.",
    "signature": {
      "returnType": "vec4",
      "name": "dilateVertical",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/dilate-vertical"
    ]
  },
  {
    "id": "image-and-filters/morphology/erode-cross",
    "name": "Erode Cross",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological erosion with a cross-shaped kernel (horizontal and vertical arms). Radius in pixels, up to 32.",
    "signature": {
      "returnType": "vec4",
      "name": "erodeCross",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "dependencies": [
      "image-and-filters/morphology/erode-horizontal",
      "image-and-filters/morphology/erode-vertical"
    ],
    "formerIds": [
      "image/morphology/erode-cross"
    ]
  },
  {
    "id": "image-and-filters/morphology/erode-disc",
    "name": "Erode Disc",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological erosion with a circular kernel: per-channel minimum over a disc. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "erodeDisc",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/erode-disc"
    ]
  },
  {
    "id": "image-and-filters/morphology/erode-horizontal",
    "name": "Erode Horizontal",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "One-dimensional horizontal erosion (minimum along X). Radius in pixels, up to 32. Chain with Erode Vertical in a second pass for a cheap separable square erosion.",
    "signature": {
      "returnType": "vec4",
      "name": "erodeHorizontal",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/erode-horizontal"
    ]
  },
  {
    "id": "image-and-filters/morphology/erode-square",
    "name": "Erode Square",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Morphological erosion with a square kernel: per-channel minimum over the neighborhood. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "erodeSquare",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/erode-square"
    ]
  },
  {
    "id": "image-and-filters/morphology/erode-vertical",
    "name": "Erode Vertical",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "One-dimensional vertical erosion (minimum along Y). Radius in pixels, up to 32. Chain after Erode Horizontal for a cheap separable square erosion.",
    "signature": {
      "returnType": "vec4",
      "name": "erodeVertical",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "formerIds": [
      "image/morphology/erode-vertical"
    ]
  },
  {
    "id": "image-and-filters/morphology/morph-edge-inner",
    "name": "Morphological Inner Edge",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Source minus erosion (square kernel): extracts the inner edge of shapes. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "morphEdgeInner",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "dependencies": [
      "image-and-filters/morphology/erode-square"
    ],
    "formerIds": [
      "image/morphology/morph-edge-inner"
    ]
  },
  {
    "id": "image-and-filters/morphology/morph-edge-outer",
    "name": "Morphological Outer Edge",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Dilation minus source (square kernel): extracts the outer edge of shapes. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "morphEdgeOuter",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "dependencies": [
      "image-and-filters/morphology/dilate-square"
    ],
    "formerIds": [
      "image/morphology/morph-edge-outer"
    ]
  },
  {
    "id": "image-and-filters/morphology/morph-gradient",
    "name": "Morphological Gradient",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Dilation minus erosion with a square kernel: highlights the outline of shapes, centered on the edge. Radius in pixels, up to 8.",
    "signature": {
      "returnType": "vec4",
      "name": "morphGradient",
      "parameters": "sampler2D tex, vec2 uv, vec2 pixelSize, float radius"
    },
    "dependencies": [
      "image-and-filters/morphology/erode-square",
      "image-and-filters/morphology/dilate-square"
    ],
    "formerIds": [
      "image/morphology/morph-gradient"
    ]
  },
  {
    "id": "image-and-filters/post-processing/antialiased-step",
    "name": "Antialiased Step",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Performs an antialiased step function on a value.",
    "signature": {
      "returnType": "float",
      "name": "antialiasedStep",
      "parameters": "float value, float pixelSize"
    },
    "formerIds": [
      "antialias/antialiased-step"
    ]
  },
  {
    "id": "image-and-filters/post-processing/bloom",
    "name": "Bloom",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "The glow of the bright parts of an image. It keeps what is brighter than a threshold (softness is how gradually it fades in above it), spreads it over a disc whose radius is a fraction of the picture height, and returns the light that spills around. Add it to the image, multiplied by an intensity: image + bloom * intensity. A bright logo then seems to shine into its surroundings.",
    "signature": {
      "returnType": "vec3",
      "name": "bloomGlow",
      "parameters": "sampler2D image, vec2 uv, vec2 resolution, float threshold, float softness, float radius"
    }
  },
  {
    "id": "image-and-filters/post-processing/chromatic-aberration",
    "name": "Chromatic Aberration",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "The colored fringe of a lens: the red, green and blue of an image are moved apart from the center of the picture, more and more toward the edges, with no effect in the middle. Amount is the distance (in texture coordinates) of the shift at the corners: 0.01 is subtle, 0.05 is strong. Give it a value that jumps on the strong moments for an effect that hits. Unlike Glitch RGB Split, which moves the colors by the same distance everywhere.",
    "signature": {
      "returnType": "vec4",
      "name": "chromaticAberration",
      "parameters": "sampler2D image, vec2 uv, float amount"
    }
  },
  {
    "id": "image-and-filters/post-processing/dither",
    "name": "Dither",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Adds a noise of strength levels of 8 bits (1 is enough) to a color, from the pixel it is for (the uv times the viewport size, so that it does not move): a smooth gradient then shows no bands.",
    "signature": {
      "returnType": "vec3",
      "name": "dither",
      "parameters": "vec3 color, vec2 pixel, float strength"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-12"
    ]
  },
  {
    "id": "image-and-filters/post-processing/film-grain",
    "name": "Film Grain",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Adds the grain of a film to a color. The grains are size pixels wide (1 is the finest) and drawn again 24 times a second, so the grain moves like a film does. Amount is how strong it is (0.03 is subtle, 0.1 is strong); it is stronger in the mid-tones than in the blacks and the whites. Put it last in a chain of effects: it also hides the fine pattern left by a blur.",
    "signature": {
      "returnType": "vec3",
      "name": "filmGrain",
      "parameters": "vec3 color, vec2 uv, vec2 resolution, float time, float amount, float size"
    }
  },
  {
    "id": "image-and-filters/post-processing/reinhard-tonemap",
    "name": "Reinhard Tonemap",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Compresses HDR color values into the displayable 0-1 range using the Reinhard tonemapping operator, followed by gamma correction.",
    "signature": {
      "returnType": "vec3",
      "name": "reinhardTonemap",
      "parameters": "vec3 color, float gamma"
    },
    "formerIds": [
      "postprocessing/reinhard-tonemap"
    ]
  },
  {
    "id": "image-and-filters/post-processing/scanlines",
    "name": "Scanlines",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Dark horizontal lines, like a CRT. y is the vertical position in pixels (the uv height times the viewport height), period the distance between two lines in pixels, strength how dark the lines are (0 = none, 1 = black).",
    "signature": {
      "returnType": "vec4",
      "name": "scanlines",
      "parameters": "vec4 color, float y, float strength, float period"
    }
  },
  {
    "id": "image-and-filters/post-processing/toon",
    "name": "Toon Postprocessing",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Quantizes a lighting value into discrete levels for a stylized toon shading effect.",
    "signature": {
      "returnType": "float",
      "name": "toonPostprocessing",
      "parameters": "float lighting, float levels"
    },
    "formerIds": [
      "postprocessing/toon"
    ]
  },
  {
    "id": "image-and-filters/post-processing/vignette",
    "name": "Vignette",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Darkens the edges of the screen. Takes uv in [0, 1], a strength (0 = none, 1 = black at the edges) and a falloff (0.5 = default). Returns a factor to multiply with a color.",
    "signature": {
      "returnType": "float",
      "name": "vignette",
      "parameters": "vec2 uv, float strength, float falloff"
    },
    "formerIds": [
      "postprocessing/vignette"
    ]
  },
  {
    "id": "image-and-filters/sampling/echo-trail",
    "name": "Echo Trail",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "A trail that follows no memory: 16 echoes of the image, each shifted by step and dimmer than the last (fade, from 0 to 1: 0.85 is a short trail, 0.95 a long one), and the brightest wins. The trail lies opposite to step. It gives the same image every time, wherever the video is played from, which a feedback pass does not. Give step a different value at each pixel (a flow from Curl Noise 2D) to make the trails follow the flow.",
    "signature": {
      "returnType": "vec4",
      "name": "echoTrail",
      "parameters": "sampler2D image, vec2 uv, vec2 step, float fade"
    }
  },
  {
    "id": "image-and-filters/sampling/sample-bicubic",
    "name": "Bicubic Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Texture sampling using bicubic reconstruction.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleBicubic",
      "parameters": "sampler2D tex, vec2 uv, vec2 texSize"
    },
    "dependencies": [
      "image-and-filters/kernels/bicubic"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-bicubic",
      "image/sampling/sample-bicubic",
      "sampling/sample-bicubic"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-bilinear",
    "name": "Bilinear Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Samples a texture using bilinear interpolation.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleBilinear",
      "parameters": "sampler2D tex, vec2 uv, vec2 resolution"
    },
    "dependencies": [
      "image-and-filters/kernels/bilinear"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-bilinear",
      "image/sampling/sample-bilinear",
      "sampling/sample-bilinear"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-bounded",
    "name": "Bounded Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Samples a texture with UV coordinates, returning transparent black if out of bounds.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleBounded",
      "parameters": "sampler2D image, vec2 uv"
    },
    "formerIds": [
      "image-sampling/helpers/sample-image-bounded",
      "image/sampling/sample-bounded"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-gaussian",
    "name": "Gaussian Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Texture reconstruction using a Gaussian weighted kernel.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleGaussian",
      "parameters": "sampler2D tex, vec2 uv, vec2 texSize, float sigma, float radius"
    },
    "dependencies": [
      "image-and-filters/kernels/gaussian"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-gaussian",
      "image/sampling/sample-gaussian",
      "sampling/sample-gaussian"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-lanczos",
    "name": "Lanczos Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "High quality texture reconstruction using Lanczos interpolation.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleLanczos",
      "parameters": "sampler2D tex, vec2 uv, vec2 texSize, float radius"
    },
    "dependencies": [
      "image-and-filters/kernels/lanczos"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-lanczos",
      "image/sampling/sample-lanczos",
      "sampling/sample-lanczos"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-luminance-blurred",
    "name": "Sample Luminance Blurred",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "The brightness of an image around a point, averaged over four taps at the corners of a square of the given radius (in uv units): a smooth height to displace a surface with.",
    "signature": {
      "returnType": "float",
      "name": "sampleLuminanceBlurred",
      "parameters": "sampler2D image, vec2 uv, float radius"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-luminance-blurred",
      "image/sampling/sample-luminance-blurred"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-mitchell-netravali",
    "name": "Mitchell-Netravali Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "High quality texture reconstruction using Mitchell-Netravali interpolation.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleMitchell",
      "parameters": "sampler2D tex, vec2 uv, vec2 texSize"
    },
    "dependencies": [
      "image-and-filters/kernels/mitchell-netravali"
    ],
    "formerIds": [
      "image-sampling/sampling/sample-mitchell-netravali",
      "image/sampling/sample-mitchell-netravali",
      "sampling/sample-mitchell-netravali"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-native",
    "name": "Native Size Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Outputs the image at its native size within the viewport (outputs alpha for areas outside the image).",
    "signature": {
      "returnType": "vec4",
      "name": "sampleAtNativeSize",
      "parameters": "sampler2D image, vec2 uv, vec2 imageSize, vec2 viewportSize"
    },
    "dependencies": [
      "image-and-filters/sampling/sample-bounded"
    ],
    "formerIds": [
      "image/sampling/sample-native"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-nearest",
    "name": "Nearest Sampling",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Samples a texture using nearest-neighbor interpolation.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleNearest",
      "parameters": "sampler2D tex, vec2 uv, vec2 resolution"
    },
    "formerIds": [
      "image-sampling/sampling/sample-nearest",
      "image/sampling/sample-nearest",
      "sampling/sample-nearest"
    ]
  },
  {
    "id": "image-and-filters/sampling/sample-tileable",
    "name": "Sample Tileable",
    "family": "image-and-filters",
    "mode": "fragment",
    "description": "Reads a picture so that it repeats without a visible seam: give it uv beyond 0..1 and the copies join edge to edge. Near each edge, the picture is cross-faded with the picture shifted by half its size, so both sides of a seam show the same color. blendWidth is how far the fade goes in from each edge, per axis, as a part of the picture (0 = no fade, the seam stays; 0.5 = the whole picture is faded). smoothness shapes the fade from a straight line (0) to a soft ease (1). offset moves the picture before the fade, to choose where the faded band falls. Reads the picture four times. A wide fade leaves a faint ghost of the middle of the picture on the edges: a narrower one keeps more of the picture and shows a softer join.",
    "signature": {
      "returnType": "vec4",
      "name": "sampleTileable",
      "parameters": "sampler2D image, vec2 uv, vec2 blendWidth, float smoothness, vec2 offset"
    }
  },
  {
    "id": "lighting-and-3d/atmosphere/aerial-perspective",
    "name": "Aerial Perspective",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Atmospheric perspective: distant surfaces fade into fogColor (blue extinguishes faster) and warm toward sunColor when facing the sun. density ~ 0.002..0.02 depending on scene scale.",
    "signature": {
      "returnType": "vec3",
      "name": "aerialPerspective",
      "parameters": "vec3 color, float distanceToHit, vec3 direction, vec3 sunDirection, vec3 fogColor, vec3 sunColor, float density"
    },
    "formerIds": [
      "atmosphere/aerial-perspective"
    ]
  },
  {
    "id": "lighting-and-3d/atmosphere/height-fog",
    "name": "Height Fog",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Valley fog: exponential density decreasing with altitude, integrated analytically along the ray. density ~ 0.005..0.05, falloff ~ 0.05..0.5 (higher = fog hugging the ground). Great for poetic moods.",
    "signature": {
      "returnType": "vec3",
      "name": "heightFog",
      "parameters": "vec3 color, vec3 origin, vec3 direction, float distanceToHit, vec3 fogColor, float density, float falloff"
    },
    "formerIds": [
      "atmosphere/height-fog"
    ]
  },
  {
    "id": "lighting-and-3d/atmosphere/sky-color",
    "name": "Sky Color",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Sky gradient from horizon to zenith with a halo and a sun disc. direction = ray direction, sunDirection = direction toward the sun.",
    "signature": {
      "returnType": "vec3",
      "name": "skyColor",
      "parameters": "vec3 direction, vec3 sunDirection, vec3 zenith, vec3 horizon, vec3 sunColor"
    },
    "formerIds": [
      "atmosphere/sky-color"
    ]
  },
  {
    "id": "lighting-and-3d/environment/environment-color",
    "name": "Environment Color",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The color of an environment map (an equirectangular panorama) in a direction: the map is read where the direction points. It is what the reflection and the refraction of an environment read, and what a ray that left an object reads once it has been bent as it should be.",
    "signature": {
      "returnType": "vec3",
      "name": "environmentColor",
      "parameters": "sampler2D environmentMap, vec3 direction"
    },
    "dependencies": [
      "lighting-and-3d/environment/equirect-uv"
    ]
  },
  {
    "id": "lighting-and-3d/environment/environment-reflection",
    "name": "Environment Reflection",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The color of an environment map (an equirectangular panorama) seen in the reflection of a surface: the incident direction is reflected around the normal, and the map is read in that direction. Wire the ray that comes from the camera as the incident direction, the normal of the surface, and the panorama.",
    "signature": {
      "returnType": "vec3",
      "name": "environmentReflection",
      "parameters": "sampler2D environmentMap, vec3 incident, vec3 normal"
    },
    "dependencies": [
      "lighting-and-3d/environment/environment-color"
    ]
  },
  {
    "id": "lighting-and-3d/environment/environment-refraction",
    "name": "Environment Refraction",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The color of an environment map (an equirectangular panorama) seen through a transparent surface: the incident direction is bent by the surface (Snell's law, from air into a material of the given index of refraction: about 1.33 for water, 1.5 for glass, 2.4 for diamond), and the map is read in that direction. Where the light cannot go through (total internal reflection) the ray is reflected. The normal is turned to face the ray if it does not.",
    "signature": {
      "returnType": "vec3",
      "name": "environmentRefraction",
      "parameters": "sampler2D environmentMap, vec3 incident, vec3 normal, float indexOfRefraction"
    },
    "dependencies": [
      "lighting-and-3d/environment/environment-color"
    ]
  },
  {
    "id": "lighting-and-3d/environment/equirect-uv",
    "name": "Equirectangular UV",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The place of a direction in an equirectangular panorama (a sky or an environment picture that is twice as wide as it is tall): u goes around the vertical axis, from 0 to 1, and v from the bottom (down) to the top (up), with y up. Use it to read an environment map with the direction a ray takes after it has been reflected or refracted.",
    "signature": {
      "returnType": "vec2",
      "name": "equirectUV",
      "parameters": "vec3 direction"
    }
  },
  {
    "id": "lighting-and-3d/glass/glass-2d",
    "name": "Glass 2D",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A pane of glass in front of an image, in screen space: the image is read a little off where it should be, in the direction the normal of the glass tilts (what a bumped or wavy glass does to what is behind it), with each color a little farther than the one before (dispersion), then tinted. Where the glass is seen at a grazing angle (the normal turned away from the viewer) a reflection color is mixed in. The normal is a unit vector with z toward the viewer: (0, 0, 1) is flat glass and shows the image as it is.",
    "signature": {
      "returnType": "vec4",
      "name": "glass2D",
      "parameters": "sampler2D background, vec2 uv, vec3 normal, float refraction, float dispersion, vec3 tint, vec3 reflection, float reflectivity"
    }
  },
  {
    "id": "lighting-and-3d/glass/glass-3d",
    "name": "Glass 3D",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A transparent surface that keeps what is behind it, bent: the environment seen through it (refracted by the normal, then tinted) is mixed with the one it reflects, more of the reflection where the surface is seen at a grazing angle (Fresnel, Schlick, with the reflectance the index of refraction gives). Because the normal drives the refraction, a surface whose normal is bumped (waves, a wobble, a normal map) deforms what is seen through it. The tint is what the material takes from the light, white for clear glass. For the transparency of the result when it is composited, see Glass Opacity.",
    "signature": {
      "returnType": "vec3",
      "name": "glass3D",
      "parameters": "sampler2D environmentMap, vec3 incident, vec3 normal, float indexOfRefraction, vec3 tint, float fresnelPower"
    },
    "dependencies": [
      "lighting-and-3d/environment/environment-reflection",
      "lighting-and-3d/environment/environment-refraction",
      "lighting-and-3d/lighting/fresnel",
      "lighting-and-3d/lighting/reflectance/refractive-index-to-reflectance"
    ]
  },
  {
    "id": "lighting-and-3d/glass/glass-absorption",
    "name": "Glass Absorption",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "What a medium takes from the light that goes through it, by the distance it goes: a multiplier for the color. The tint is the color of the light after one unit of the medium at a density of 1: white takes nothing, and a darker or more saturated tint takes more, the farther the light goes (Beer-Lambert, as a power of the tint). The thickness is the distance in the medium (Refract Through Sphere gives it), and the density scales it. Multiply what is seen through the glass by it.",
    "signature": {
      "returnType": "vec3",
      "name": "glassAbsorption",
      "parameters": "vec3 tint, float thickness, float density"
    }
  },
  {
    "id": "lighting-and-3d/glass/glass-opacity",
    "name": "Glass Opacity",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The alpha of a transparent surface, for compositing it over what is behind: a clear glass lets nearly everything through where it is seen straight on, and reflects more, so shows more of itself, at a grazing angle (the Fresnel reflectance of the index of refraction, Schlick). Absorption is how much of the light the material stops anyway, from 0 (clear) to 1 (opaque). Use it as the alpha of the color of the glass.",
    "signature": {
      "returnType": "float",
      "name": "glassOpacity",
      "parameters": "vec3 incident, vec3 normal, float indexOfRefraction, float absorption, float fresnelPower"
    },
    "dependencies": [
      "lighting-and-3d/lighting/fresnel",
      "lighting-and-3d/lighting/reflectance/refractive-index-to-reflectance"
    ]
  },
  {
    "id": "lighting-and-3d/glass/refract-sphere",
    "name": "Refract Through Sphere",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The direction in which a ray leaves a solid glass sphere centered on the origin, and how far it went inside. The ray enters at the hit point, bent by the normal there (Snell's law, from air into the material of the given index of refraction), crosses the sphere, and leaves bent again by the surface it meets from inside: the picture seen through a ball is upside down. The normal can be the plain normal of the sphere or a bumped one (the ball then deforms what it shows): the bumps are applied again where the ray leaves, so the picture seen through the ball is bent by them twice. Where the light cannot enter or leave (total internal reflection) the ray is reflected. The direction must be a unit vector. Read an environment with the direction (Environment Color) and multiply it by the absorption of the thickness (Glass Absorption).",
    "signature": {
      "returnType": "vec3",
      "name": "refractThroughSphere",
      "parameters": "vec3 hitPoint, vec3 direction, vec3 normal, float radius, float indexOfRefraction, out float thickness"
    }
  },
  {
    "id": "lighting-and-3d/lighting/ambient/flat",
    "name": "Flat Ambient",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Applies a constant ambient light contribution by scaling the base color with a fixed intensity, independent of surface orientation.",
    "signature": {
      "returnType": "vec3",
      "name": "flatAmbient",
      "parameters": "vec3 color, float intensity"
    },
    "formerIds": [
      "lighting/ambient/flat"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/ambient/hemisphere",
    "name": "Hemisphere Ambient",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Computes ambient lighting by blending between sky and ground based on the surface normal.",
    "signature": {
      "returnType": "float",
      "name": "hemisphereAmbient",
      "parameters": "vec3 normal, vec3 up, float sky, float ground"
    },
    "formerIds": [
      "lighting/ambient/hemisphere"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/combine-lighting",
    "name": "Combine Lighting",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Combines the lighting terms of one light into a color: albedo * (ambientColor * ambient * ao + lightColor * diffuse * shadow) + specularColor * lightColor * specular * shadow. Ambient and occlusion are not shadowed; diffuse and specular are. For several lights, call it once per light with ambient set to 0 on all but one, and add the results.",
    "signature": {
      "returnType": "vec3",
      "name": "combineLighting",
      "parameters": "vec3 albedo, vec3 ambientColor, float ambient, float ao, vec3 lightColor, float diffuse, float specular, vec3 specularColor, float shadow"
    }
  },
  {
    "id": "lighting-and-3d/lighting/diffuse/half-lambert",
    "name": "Half Lambert",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Calculates a softer diffuse lighting term using a half-Lambert model.",
    "signature": {
      "returnType": "float",
      "name": "halfLambert",
      "parameters": "vec3 normal, vec3 lightDirection"
    },
    "formerIds": [
      "lighting/diffuse/half-lambert"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/diffuse/lambert",
    "name": "Lambert",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Calculates diffuse lighting using Lambert's cosine law.",
    "signature": {
      "returnType": "float",
      "name": "lambertDiffuse",
      "parameters": "vec3 normal, vec3 lightDirection"
    },
    "formerIds": [
      "lighting/diffuse/lambert"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/diffuse/wrap-diffuse",
    "name": "Wrapped Diffuse",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Wrapped diffuse lighting: clamp((N·L + wrap) / (1 + wrap), 0, 1). Output in [0, 1]. wrap = 0 gives Lambert, wrap = 1 gives Half-Lambert, wrap = 3/7 (about 0.4286) gives clamp(0.3 + 0.7 * N·L, 0, 1) as used in several Inigo Quilez shaders. Larger wrap softens the terminator and lets light wrap around the shadow side. Normal and light direction are normalised internally.",
    "signature": {
      "returnType": "float",
      "name": "wrapDiffuse",
      "parameters": "vec3 normal, vec3 lightDirection, float wrap"
    },
    "formerIds": [
      "lighting/diffuse/wrap-diffuse"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/fresnel",
    "name": "Fresnel (Schlick)",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Physically-based Fresnel reflectance approximation, blending a base reflectance F0 towards full reflectance at grazing angles.",
    "signature": {
      "returnType": "vec3",
      "name": "fresnelSchlick",
      "parameters": "vec3 normal, vec3 viewDirection, vec3 baseReflectance, float power"
    },
    "formerIds": [
      "lighting/fresnel"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/point-light",
    "name": "Point Light",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Light from a point. Returns the normalized direction from the surface position to the light (to feed Lambert, Blinn-Phong or Soft Shadow) and gives at attenuation a quadratic falloff, 1 at the light and 0 at radius and beyond. Multiply the diffuse and specular terms by attenuation.",
    "signature": {
      "returnType": "vec3",
      "name": "pointLight",
      "parameters": "vec3 position, vec3 lightPosition, float radius, out float attenuation"
    }
  },
  {
    "id": "lighting-and-3d/lighting/reflectance/metallic-reflectance",
    "name": "Metallic Base Reflectance",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Computes the base reflectance (F0) for the metallic PBR workflow, blending a dielectric constant with the surface albedo based on metalness.",
    "signature": {
      "returnType": "vec3",
      "name": "metallicBaseReflectance",
      "parameters": "vec3 albedo, float metallic"
    },
    "formerIds": [
      "lighting/reflectance/metallic-reflectance"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/reflectance/refractive-index-to-reflectance",
    "name": "Refractive Index To Reflectance",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Derives the base reflectance (F0) of a dielectric material from its refractive index, using the Fresnel formula at normal incidence.",
    "signature": {
      "returnType": "vec3",
      "name": "refractiveIndexToBaseReflectance",
      "parameters": "float refractiveIndex"
    },
    "formerIds": [
      "lighting/reflectance/refractive-index-to-reflectance"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/simple-fresnel",
    "name": "Simple Fresnel",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Generic Fresnel/rim term based on the angle between the surface normal and view direction, without a base reflectance.",
    "signature": {
      "returnType": "float",
      "name": "simpleFresnel",
      "parameters": "vec3 normal, vec3 viewDirection, float power"
    },
    "formerIds": [
      "lighting/simple-fresnel"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/specular/blinn-phong",
    "name": "Blinn-Phong Specular",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Calculates specular lighting using the Blinn-Phong reflection model.",
    "signature": {
      "returnType": "float",
      "name": "blinnPhongSpecular",
      "parameters": "vec3 normal, vec3 lightDirection, vec3 viewDirection, float shininess"
    },
    "formerIds": [
      "lighting/specular/blinn-phong"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/specular/hemisphere",
    "name": "Hemisphere Specular",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Approximates a specular highlight from a hemispherical light source using a smooth threshold on the reflection vector's alignment with the up axis.",
    "signature": {
      "returnType": "float",
      "name": "hemisphereSpecular",
      "parameters": "vec3 reflectDirection, vec3 up, float edge0, float edge1"
    },
    "formerIds": [
      "lighting/specular/hemisphere"
    ]
  },
  {
    "id": "lighting-and-3d/lighting/specular/phong",
    "name": "Phong Specular",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Calculates specular lighting using the Phong reflection model.",
    "signature": {
      "returnType": "float",
      "name": "phongSpecular",
      "parameters": "vec3 normal, vec3 lightDirection, vec3 viewDirection, float shininess"
    },
    "formerIds": [
      "lighting/specular/phong"
    ]
  },
  {
    "id": "lighting-and-3d/maps/depth/depth-to-unit",
    "name": "Depth To Unit",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A distance as a depth map from 0 (at the near plane) to 1 (at the far plane): the picture a depth export wants. Black is near, white is far.",
    "signature": {
      "returnType": "float",
      "name": "depthToUnit",
      "parameters": "float eyeDistance, float nearPlane, float farPlane"
    },
    "formerIds": [
      "maps/depth/depth-to-unit"
    ]
  },
  {
    "id": "lighting-and-3d/maps/depth/linearize-depth",
    "name": "Linearize Depth",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A depth buffer value (0 to 1, not linear) as the distance from the camera, between the near and far planes of the projection.",
    "signature": {
      "returnType": "float",
      "name": "linearizeDepth",
      "parameters": "float depth, float nearPlane, float farPlane"
    },
    "formerIds": [
      "maps/depth/linearize-depth"
    ]
  },
  {
    "id": "lighting-and-3d/maps/displacement/displace-uv",
    "name": "Displace UV",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Moves texture coordinates along a direction by a displacement map: a height of 0.5 does not move them, above pushes one way, below the other. Sample an image at the result to displace it.",
    "signature": {
      "returnType": "vec2",
      "name": "displaceUv",
      "parameters": "vec2 uv, float height, vec2 direction, float amount"
    },
    "formerIds": [
      "maps/displacement/displace-uv"
    ]
  },
  {
    "id": "lighting-and-3d/maps/displacement/normal-offset-uv",
    "name": "Normal Offset UV",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Moves texture coordinates by the x and y of a normal, as a cheap refraction or a bump on a picture: sample an image at the result and it bends as the relief does. The amount is in uv units.",
    "signature": {
      "returnType": "vec2",
      "name": "normalOffsetUv",
      "parameters": "vec2 uv, vec3 normal, float amount"
    },
    "formerIds": [
      "maps/displacement/normal-offset-uv"
    ]
  },
  {
    "id": "lighting-and-3d/maps/displacement/parallax-occlusion",
    "name": "Parallax Occlusion UV",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Parallax occlusion mapping: marches a ray through the height map in layers and gives the texture coordinates where it meets the surface, with steep parallax and hidden parts that simple parallax cannot do. 1 to 64 layers; the view is a unit vector from the surface to the eye, in tangent space.",
    "signature": {
      "returnType": "vec2",
      "name": "parallaxOcclusionUv",
      "parameters": "sampler2D heights, vec2 uv, vec3 viewDirection, float scale, float layerCount"
    },
    "formerIds": [
      "maps/displacement/parallax-occlusion"
    ]
  },
  {
    "id": "lighting-and-3d/maps/displacement/parallax-offset",
    "name": "Parallax Offset",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Simple parallax mapping: the texture coordinates shifted against the view, by the height at this point, so a flat picture looks as if it had depth. The view is a unit vector from the surface to the eye, in tangent space (z toward the viewer).",
    "signature": {
      "returnType": "vec2",
      "name": "parallaxOffset",
      "parameters": "vec2 uv, vec3 viewDirection, float height, float scale"
    },
    "formerIds": [
      "maps/displacement/parallax-offset"
    ]
  },
  {
    "id": "lighting-and-3d/maps/height/curvature-from-height",
    "name": "Curvature From Height",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The curvature of a height map: 0 on a flat or a constant slope, negative on a crest (convex), positive in a hollow (concave). Laplacian of the 4 neighbours. Add 0.5 to see it as a mask of edges and cavities.",
    "signature": {
      "returnType": "float",
      "name": "curvatureFromHeight",
      "parameters": "sampler2D heights, vec2 uv, vec2 resolution, float strength"
    },
    "formerIds": [
      "maps/height/curvature-from-height"
    ]
  },
  {
    "id": "lighting-and-3d/maps/height/height-ambient-occlusion",
    "name": "Height Ambient Occlusion",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "An ambient occlusion map from a height map: 1 where the surface is open, darker in a hollow, where the ground around is higher (16 samples, 2 rings of 8). The radius is in pixels.",
    "signature": {
      "returnType": "float",
      "name": "heightAmbientOcclusion",
      "parameters": "sampler2D heights, vec2 uv, vec2 resolution, float radius, float strength"
    },
    "formerIds": [
      "maps/height/height-ambient-occlusion"
    ]
  },
  {
    "id": "lighting-and-3d/maps/height/height-from-image",
    "name": "Height From Image",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A height map from the luminance of an image: contrast around the middle gray and a bias to lift or lower it. Not clamped, so a float export keeps what goes past 0 to 1.",
    "signature": {
      "returnType": "float",
      "name": "heightFromImage",
      "parameters": "sampler2D image, vec2 uv, float contrast, float bias"
    },
    "dependencies": [
      "color/luminance"
    ],
    "formerIds": [
      "maps/height/height-from-image"
    ]
  },
  {
    "id": "lighting-and-3d/maps/height/height-gradient",
    "name": "Height Gradient",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The slope of a height map (its red channel) at a point, as the change of height for one pixel along x and along y. Sobel 3x3, which smooths the noise of a single-pixel difference. y goes up, as v does.",
    "signature": {
      "returnType": "vec2",
      "name": "heightGradient",
      "parameters": "sampler2D heights, vec2 uv, vec2 resolution"
    },
    "formerIds": [
      "maps/height/height-gradient"
    ]
  },
  {
    "id": "lighting-and-3d/maps/mask/slope-mask",
    "name": "Slope Mask",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A mask of the steep parts of a surface from its normal: 0 where it is flat, 1 where it is a cliff. The threshold is the steepness (0 flat, 1 vertical) where the mask is half, the softness how wide the edge is. Rock on slopes, snow on flats.",
    "signature": {
      "returnType": "float",
      "name": "slopeMask",
      "parameters": "vec3 normal, float threshold, float softness"
    },
    "formerIds": [
      "maps/mask/slope-mask"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/blend-normals-rnm",
    "name": "Blend Normals (RNM)",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Puts the detail of one tangent-space normal map on another by reorienting it along the base (Reoriented Normal Mapping), which keeps the detail where a simple average flattens it. Both normals are unit vectors (-1 to 1).",
    "signature": {
      "returnType": "vec3",
      "name": "blendNormalsRnm",
      "parameters": "vec3 base, vec3 detail"
    },
    "formerIds": [
      "maps/normal/blend-normals-rnm"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/color-to-normal",
    "name": "Color To Normal",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The normal (-1 to 1, unit length) that the color of a normal map (0 to 1) stands for: read a normal map picture, then light it or blend it.",
    "signature": {
      "returnType": "vec3",
      "name": "colorToNormal",
      "parameters": "vec3 color"
    },
    "formerIds": [
      "maps/normal/color-to-normal"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/flip-normal-green",
    "name": "Flip Normal Green",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Turns a normal map from the OpenGL convention (green up, Blender, Unity, glTF) to the DirectX one (green down, Unreal, 3ds Max) and back.",
    "signature": {
      "returnType": "vec3",
      "name": "flipNormalGreen",
      "parameters": "vec3 normal"
    },
    "formerIds": [
      "maps/normal/flip-normal-green"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/normal-from-height-map",
    "name": "Normal From Height Map",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A tangent-space normal map from a height map (its red channel). Strength is how many pixels tall a height of 1 is: 1 is a gentle relief, 32 a deep one. +Z comes out of the surface, +Y is up (OpenGL); flip the green for DirectX.",
    "signature": {
      "returnType": "vec3",
      "name": "normalFromHeightMap",
      "parameters": "sampler2D heights, vec2 uv, vec2 resolution, float strength"
    },
    "dependencies": [
      "lighting-and-3d/maps/height/height-gradient"
    ],
    "formerIds": [
      "maps/normal/normal-from-height-map"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/normal-from-heights",
    "name": "Tangent Normal From Heights",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A tangent-space normal from 4 heights taken one pixel apart (left, right, down, up), for a height that is built from nodes or code and not read from an image. Strength is how many pixels tall a height of 1 is. +Z out of the surface, +Y up.",
    "signature": {
      "returnType": "vec3",
      "name": "tangentNormalFromHeights",
      "parameters": "float heightLeft, float heightRight, float heightDown, float heightUp, float strength"
    },
    "formerIds": [
      "maps/normal/normal-from-heights"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/normal-strength",
    "name": "Normal Strength",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Makes the relief of a tangent-space normal stronger (above 1) or weaker (below 1; 0 is flat) by scaling its x and y and normalizing again.",
    "signature": {
      "returnType": "vec3",
      "name": "normalStrength",
      "parameters": "vec3 normal, float strength"
    },
    "formerIds": [
      "maps/normal/normal-strength"
    ]
  },
  {
    "id": "lighting-and-3d/maps/normal/normal-to-color",
    "name": "Normal To Color",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "A normal (-1 to 1) as the color of a normal map (0 to 1): the familiar blue picture. A float export does not need it, it can keep the normal as it is.",
    "signature": {
      "returnType": "vec3",
      "name": "normalToColor",
      "parameters": "vec3 normal"
    },
    "formerIds": [
      "maps/normal/normal-to-color"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/aabb",
    "name": "Ray AABB Intersection",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Computes the intersection of a ray with an axis-aligned bounding box (AABB).",
    "signature": {
      "returnType": "vec2",
      "name": "rayAabbIntersection",
      "parameters": "vec3 origin, vec3 direction, vec3 halfSize"
    },
    "formerIds": [
      "raymarching/intersection/aabb"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/extruded-sdf-normal",
    "name": "Extruded SDF Normal",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The direction a surface of an extruded 2D signed distance image faces at a point on it (its normal), from the slope of the distance. Give it the hit point of Raymarch Extruded SDF (origin + direction * distance) and the same image, size, half depth and edge. Use it with the lighting snippets (Lambert, Blinn-Phong, Fresnel).",
    "signature": {
      "returnType": "vec3",
      "name": "extrudedSdfNormal",
      "parameters": "vec3 p, sampler2D sdf, vec2 size, float halfDepth, float edge"
    },
    "dependencies": [
      "shapes/operations/extruded-sdf-image"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/ground-plane",
    "name": "Ground Plane Derivative",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Computes the screen-space derivative of a ray's intersection with the y=0 plane, given a shifted ray direction (used for texture filtering / anti-aliasing on a ground plane).",
    "signature": {
      "returnType": "vec3",
      "name": "groundPlaneDerivative",
      "parameters": "vec3 rayOrigin, vec3 rayDirection, vec3 shiftedRayDirection"
    },
    "formerIds": [
      "raymarching/derivatives/ground-plane"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/ray-plane-distance",
    "name": "Ray Plane Distance",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Ray / horizontal plane intersection at y = height (sea level, lake). Returns t, or -1.0 if there is no hit in front.",
    "signature": {
      "returnType": "float",
      "name": "rayPlaneDistance",
      "parameters": "vec3 origin, vec3 direction, float height"
    },
    "formerIds": [
      "raymarching/intersection/ray-plane-distance"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/ray-sphere",
    "name": "Ray Sphere",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The distance along a ray to a sphere centered on the origin: the nearest point in front of the origin of the ray, or the far one when the origin is inside the sphere, and -1 when the ray misses. The hit point is origin + direction * distance (Point Along), and for a sphere centered on the origin its normal is that point, normalized. The direction must be a unit vector.",
    "signature": {
      "returnType": "float",
      "name": "raySphere",
      "parameters": "vec3 origin, vec3 direction, float radius"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/raymarch-continue",
    "name": "Raymarch Continue",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "",
    "signature": {
      "returnType": "float",
      "name": "raymarchContinue",
      "parameters": "float x"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/raymarch-extruded-sdf",
    "name": "Raymarch Extruded SDF",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Sphere tracing of a 2D signed distance image pulled out into a solid (see SDF Extruded Image): from the origin of a ray, steps along its direction by the distance to the solid, only inside the box that holds it (the size of the picture, as deep as the solid is thick), 96 steps at most. Returns vec2(distance along the ray, number of steps); the distance is negative when the ray misses, so it is also the mask of the solid. The hit point is origin + direction * distance. Give it the rays of Perspective Ray to turn around the solid with a camera.",
    "signature": {
      "returnType": "vec2",
      "name": "raymarchExtrudedSdf",
      "parameters": "vec3 origin, vec3 direction, sampler2D sdf, vec2 size, float halfDepth, float edge"
    },
    "dependencies": [
      "shapes/operations/extruded-sdf-image",
      "lighting-and-3d/raymarching/aabb"
    ]
  },
  {
    "id": "lighting-and-3d/raymarching/raymarch-step",
    "name": "Raymarch Step",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "One step of sphere tracing, to call in a loop of the graph with the scene's distance d read at origin + direction * t. Returns the next t (unchanged on a hit). hit is 1 when d is below eps, relative to the distance travelled; done is 1 on a hit or past tMax. Carry t, hit and done in the loop's channels and keep looping while Raymarch Continue is true. After the loop, the point is origin + direction * t.",
    "signature": {
      "returnType": "float",
      "name": "raymarchStep",
      "parameters": "float d, float t, float eps, float tMax, out float hit, out float done"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/sdf-normal",
    "name": "SDF Normal",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The surface normal of a distance field, from four samples of it: the distance at the point, and at the point moved a little along x, along y and along z. The normal is the way the distance grows fastest (the gradient), as a unit vector. Evaluate the distance four times (the point, then the point plus a small step on each axis, 0.001 to 0.002 for a solid about one unit wide), wire the four results here, and light the surface with the normal. With the point on the surface the normal points out of the solid.",
    "signature": {
      "returnType": "vec3",
      "name": "sdfNormal",
      "parameters": "float center, float dx, float dy, float dz"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/sdf-normal-points",
    "name": "Sdf Normal Points",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "",
    "signature": {
      "returnType": "float",
      "name": "sdfNormalPoints",
      "parameters": "float x"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/sdf-occlusion",
    "name": "SDF Occlusion",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "Ambient occlusion of a distance field, from its distance at three points on the normal (at a third, two thirds and all of the radius, which SDF Occlusion Points gives). In the open, the distance at each point is its height above the surface, and nothing is blocked; in a corner or under an overhang it is smaller, and the surface is darker. It returns 1 in the open and goes toward 0 in the corners. Multiply the ambient light by it.",
    "signature": {
      "returnType": "float",
      "name": "sdfOcclusion",
      "parameters": "float d1, float d2, float d3, float radius, float strength"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/sdf-occlusion-points",
    "name": "SDF Occlusion Points",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "The three points where to measure a distance field for the ambient occlusion: from the point of the surface, on the normal, at a third, two thirds and all of the radius. Measure the field at each of them, and give the three distances to SDF Occlusion with the same radius.",
    "signature": {
      "returnType": "vec3",
      "name": "sdfOcclusionPoints",
      "parameters": "vec3 position, vec3 normal, float radius, out vec3 second, out vec3 third"
    }
  },
  {
    "id": "lighting-and-3d/raymarching/sdf-soft-shadow",
    "name": "SDF Soft Shadow Step",
    "family": "lighting-and-3d",
    "mode": "fragment",
    "description": "One step of the march that makes a soft shadow with a distance field. Start a little above the surface and march toward the light in a loop: at each turn measure the distance field at the point of the ray, and give it here with how far the ray has gone and the visibility so far. It returns the new visibility and where the next step starts. A ray that passes close to the shape, for how far it has gone, loses light, which gives the penumbra; one that hits the shape (a distance near 0) loses all of it. After the loop, the visibility is 1 where the light is seen, 0 in the shadow, and in between at its edge. Multiply the diffuse and specular light by it.",
    "signature": {
      "returnType": "float",
      "name": "sdfSoftShadowStep",
      "parameters": "float gap, float travel, float visibility, float softness, float minStep, out float nextTravel"
    }
  },
  {
    "id": "math/curves/cubic-bezier",
    "name": "Cubic Bezier Point",
    "family": "math",
    "mode": "fragment",
    "description": "Evaluates a 2D cubic Bezier curve at t using four editable points. t is normally in [0, 1]; values outside that interval extrapolate the curve.",
    "signature": {
      "returnType": "vec2",
      "name": "cubicBezierPoint",
      "parameters": "vec2 start, vec2 control1, vec2 control2, vec2 end, float t"
    }
  },
  {
    "id": "math/curves/gaussian-band",
    "name": "Gaussian Band",
    "family": "math",
    "mode": "fragment",
    "description": "A bell curve: 1 at center, about 0.37 one width away, and 0 far from it. Use it for a band of light that sweeps, a pulse in time or a soft stripe.",
    "signature": {
      "returnType": "float",
      "name": "gaussianBand",
      "parameters": "float x, float center, float width"
    }
  },
  {
    "id": "math/curves/quadratic-bezier",
    "name": "Quadratic Bezier Point",
    "family": "math",
    "mode": "fragment",
    "description": "Evaluates a 2D quadratic Bezier curve at t using start, control and end points. t is normally in [0, 1]; values outside that interval extrapolate the curve.",
    "signature": {
      "returnType": "vec2",
      "name": "quadraticBezierPoint",
      "parameters": "vec2 start, vec2 control, vec2 end, float t"
    }
  },
  {
    "id": "math/easing/back/ease-in",
    "name": "Ease In Back",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Back: starts slowly and speeds up, along a curve that goes back before it goes on (or past its goal before it comes back to it): an overshoot of about 10 %. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeInBack",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/back/ease-in-out",
    "name": "Ease In Out Back",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Back: starts slowly, goes fast in the middle and slows down to a stop, along a curve that goes back before it goes on (or past its goal before it comes back to it): an overshoot of about 10 %. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutBack",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/back/ease-out",
    "name": "Ease Out Back",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Back: starts fast and slows down to a stop, along a curve that goes back before it goes on (or past its goal before it comes back to it): an overshoot of about 10 %. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeOutBack",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/bounce/ease-in",
    "name": "Ease In Bounce",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Bounce: starts slowly and speeds up, along a curve that bounces on its goal like a ball dropped on the floor. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result touches 1 again at each bounce.",
    "signature": {
      "returnType": "float",
      "name": "easeInBounce",
      "parameters": "float t"
    },
    "dependencies": [
      "math/easing/bounce/ease-out"
    ]
  },
  {
    "id": "math/easing/bounce/ease-in-out",
    "name": "Ease In Out Bounce",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Bounce: starts slowly, goes fast in the middle and slows down to a stop, along a curve that bounces on its goal like a ball dropped on the floor. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result touches 1 again at each bounce.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutBounce",
      "parameters": "float t"
    },
    "dependencies": [
      "math/easing/bounce/ease-out"
    ]
  },
  {
    "id": "math/easing/bounce/ease-out",
    "name": "Ease Out Bounce",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Bounce: starts fast and slows down to a stop, along a curve that bounces on its goal like a ball dropped on the floor. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result touches 1 again at each bounce.",
    "signature": {
      "returnType": "float",
      "name": "easeOutBounce",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/circ/ease-in",
    "name": "Ease In Circ",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Circ: starts slowly and speeds up, along a quarter of a circle: it starts slowly and ends sharply. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInCirc",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/circ/ease-in-out",
    "name": "Ease In Out Circ",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Circ: starts slowly, goes fast in the middle and slows down to a stop, along a quarter of a circle: it starts slowly and ends sharply. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutCirc",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/circ/ease-out",
    "name": "Ease Out Circ",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Circ: starts fast and slows down to a stop, along a quarter of a circle: it starts slowly and ends sharply. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutCirc",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/cubic/ease-in",
    "name": "Ease In Cubic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Cubic: starts slowly and speeds up, along a curve of the third power: more marked than Quad. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInCubic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/cubic/ease-in-out",
    "name": "Ease In Out Cubic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Cubic: starts slowly, goes fast in the middle and slows down to a stop, along a curve of the third power: more marked than Quad. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutCubic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/cubic/ease-out",
    "name": "Ease Out Cubic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Cubic: starts fast and slows down to a stop, along a curve of the third power: more marked than Quad. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutCubic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/cubic-bezier",
    "name": "Cubic Bezier Ease",
    "family": "math",
    "mode": "fragment",
    "description": "An easing drawn with four numbers, as the timing functions of CSS: the curve goes from (0, 0) to (1, 1) with two handles, (x1, y1) and (x2, y2). The x of the handles is held between 0 and 1; their y may go beyond, for an overshoot. Gives the eased progress of t, the progress from 0 to 1. (1/3, 0, 2/3, 1) is nearly a straight line; (0.42, 0, 0.58, 1) is CSS's ease-in-out; (0.25, 0.1, 0.25, 1) is its ease.",
    "signature": {
      "returnType": "float",
      "name": "cubicBezierEase",
      "parameters": "float t, float x1, float y1, float x2, float y2"
    }
  },
  {
    "id": "math/easing/elastic/ease-in",
    "name": "Ease In Elastic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Elastic: starts slowly and speeds up, along a curve that oscillates around its goal like an elastic band, with decreasing swings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeInElastic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/elastic/ease-in-out",
    "name": "Ease In Out Elastic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Elastic: starts slowly, goes fast in the middle and slows down to a stop, along a curve that oscillates around its goal like an elastic band, with decreasing swings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutElastic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/elastic/ease-out",
    "name": "Ease Out Elastic",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Elastic: starts fast and slows down to a stop, along a curve that oscillates around its goal like an elastic band, with decreasing swings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace. The result goes past 0 and 1 on the way.",
    "signature": {
      "returnType": "float",
      "name": "easeOutElastic",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/expo/ease-in",
    "name": "Ease In Expo",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Expo: starts slowly and speeds up, along an exponential curve: almost nothing for a while, then all at once. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInExpo",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/expo/ease-in-out",
    "name": "Ease In Out Expo",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Expo: starts slowly, goes fast in the middle and slows down to a stop, along an exponential curve: almost nothing for a while, then all at once. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutExpo",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/expo/ease-out",
    "name": "Ease Out Expo",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Expo: starts fast and slows down to a stop, along an exponential curve: almost nothing for a while, then all at once. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutExpo",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quad/ease-in",
    "name": "Ease In Quad",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Quad: starts slowly and speeds up, along a curve of the second power (t squared): a moderate acceleration. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInQuad",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quad/ease-in-out",
    "name": "Ease In Out Quad",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Quad: starts slowly, goes fast in the middle and slows down to a stop, along a curve of the second power (t squared): a moderate acceleration. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutQuad",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quad/ease-out",
    "name": "Ease Out Quad",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Quad: starts fast and slows down to a stop, along a curve of the second power (t squared): a moderate acceleration. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutQuad",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quart/ease-in",
    "name": "Ease In Quart",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Quart: starts slowly and speeds up, along a curve of the fourth power: marked, it stays low a long time before it rises. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInQuart",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quart/ease-in-out",
    "name": "Ease In Out Quart",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Quart: starts slowly, goes fast in the middle and slows down to a stop, along a curve of the fourth power: marked, it stays low a long time before it rises. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutQuart",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quart/ease-out",
    "name": "Ease Out Quart",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Quart: starts fast and slows down to a stop, along a curve of the fourth power: marked, it stays low a long time before it rises. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutQuart",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quint/ease-in",
    "name": "Ease In Quint",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Quint: starts slowly and speeds up, along a curve of the fifth power: the most marked of the plain powers. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInQuint",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quint/ease-in-out",
    "name": "Ease In Out Quint",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Quint: starts slowly, goes fast in the middle and slows down to a stop, along a curve of the fifth power: the most marked of the plain powers. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutQuint",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/quint/ease-out",
    "name": "Ease Out Quint",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Quint: starts fast and slows down to a stop, along a curve of the fifth power: the most marked of the plain powers. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutQuint",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/sine/ease-in",
    "name": "Ease In Sine",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Sine: starts slowly and speeds up, along a gentle curve built on a quarter of a sine wave: the softest of the easings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInSine",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/sine/ease-in-out",
    "name": "Ease In Out Sine",
    "family": "math",
    "mode": "fragment",
    "description": "Ease In Out Sine: starts slowly, goes fast in the middle and slows down to a stop, along a gentle curve built on a quarter of a sine wave: the softest of the easings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeInOutSine",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/sine/ease-out",
    "name": "Ease Out Sine",
    "family": "math",
    "mode": "fragment",
    "description": "Ease Out Sine: starts fast and slows down to a stop, along a gentle curve built on a quarter of a sine wave: the softest of the easings. Gives the eased progress of t, the progress from 0 to 1: 0 at t = 0, 1 at t = 1 (t is held between them). Feed it the progress of a movement (the time over its duration) and use the result in its place: it moves the same way, with another pace.",
    "signature": {
      "returnType": "float",
      "name": "easeOutSine",
      "parameters": "float t"
    }
  },
  {
    "id": "math/easing/smootherstep",
    "name": "Smootherstep",
    "family": "math",
    "mode": "fragment",
    "description": "The smooth step of Ken Perlin: 0 at t = 0, 1 at t = 1, flat at both ends like GLSL's smoothstep but with a zero acceleration there too, so it starts and stops even more softly. t is held between 0 and 1. Use it to blend two things, or as an ease in and out.",
    "signature": {
      "returnType": "float",
      "name": "smootherStep",
      "parameters": "float t"
    }
  },
  {
    "id": "math/negate",
    "name": "Negate",
    "family": "math",
    "mode": "fragment",
    "description": "Negates a value.",
    "signature": {
      "returnType": "float",
      "name": "negate",
      "parameters": "float value"
    }
  },
  {
    "id": "math/normalized-clamp",
    "name": "Normalized Clamp",
    "family": "math",
    "mode": "fragment",
    "description": "Clamps a value between 0 and 1.",
    "signature": {
      "returnType": "vec3",
      "name": "normalizedClamp",
      "parameters": "vec3 x"
    }
  },
  {
    "id": "math/point-along",
    "name": "Point Along",
    "family": "math",
    "mode": "fragment",
    "description": "Returns a point along a direction vector from an origin point at a specified distance.",
    "signature": {
      "returnType": "vec3",
      "name": "pointAlong",
      "parameters": "vec3 origin, vec3 direction, float dist"
    }
  },
  {
    "id": "math/progress/delay",
    "name": "Delay",
    "family": "math",
    "mode": "fragment",
    "description": "Waits before something starts. Returns the time that has passed since the wait ended: 0 while it lasts, then time minus seconds. started says that the wait is over. Give the result to what must start late (Staggered Progress, Draw On, Typewriter Count, Soft Wipe) in place of the time. In front of Loop Phase's time, the wait is made again at each loop.",
    "signature": {
      "returnType": "float",
      "name": "delayedTime",
      "parameters": "float time, float seconds, out bool started"
    }
  },
  {
    "id": "math/progress/fade",
    "name": "Fade",
    "family": "math",
    "mode": "fragment",
    "description": "The opacity of something that appears, stays and disappears: it rises from 0 to 1 over fadeIn seconds from start, holds at 1 for hold seconds, and falls back to 0 over fadeOut seconds. The result is the straight line version. rise and fall are the progress of each fade, from 0 to 1, so that each can be given its own easing before they are put together: ease(rise) * (1 - ease(fall)). Pair it with Delay for a fade that starts late.",
    "signature": {
      "returnType": "float",
      "name": "fadeEnvelope",
      "parameters": "float time, float start, float fadeIn, float hold, float fadeOut, out float rise, out float fall"
    }
  },
  {
    "id": "math/progress/keyframes",
    "name": "Keyframes",
    "family": "math",
    "mode": "fragment",
    "description": "A value that goes through five keyframes, v0 to v4, spread evenly over the progress t from 0 to 1 (t is held between them). Between two keyframes it follows a straight line when smoothness is 0, and an easing that stops softly at each keyframe when it is 1; in between, a mix. Use it for a value that does not go one way: a size that grows, shrinks, then settles.",
    "signature": {
      "returnType": "float",
      "name": "keyframeValue",
      "parameters": "float t, float v0, float v1, float v2, float v3, float v4, float smoothness"
    }
  },
  {
    "id": "math/progress/loop-crossfade",
    "name": "Loop Crossfade",
    "family": "math",
    "mode": "fragment",
    "description": "Makes a movement that does not repeat come back to where it began, by blending it with itself one loop later. Draw the scene twice, once at timeA and once at timeB, and mix the two with the weight it returns (the weight of the scene at timeA): at the start of the loop you see the scene as it will be when the loop ends, and it melts into the scene of the moment. The loop then joins at both ends. width is the part of the loop that is blended: 0 is none (the jump stays), 1 is the whole loop (a ghost all along); smoothness goes from a straight blend to a soft one. For a scene without state: a scene that keeps what it drew from frame to frame has to be blended on its frames.",
    "signature": {
      "returnType": "float",
      "name": "loopCrossfade",
      "parameters": "float phase, float duration, float width, float smoothness, out float timeA, out float timeB"
    }
  },
  {
    "id": "math/progress/loop-phase",
    "name": "Loop Phase",
    "family": "math",
    "mode": "fragment",
    "description": "Where a movement is in its loop. Returns the phase, from 0 to 1 over duration seconds, then 0 again. sine and cosine go round cycles whole times in the same duration (cycles is rounded to a whole number, at least 1): they are 0 and 1 where the loop starts and where it ends, so anything driven by them comes back to where it began. Use sine for a back and forth, sine and cosine together for a point that goes round a circle.",
    "signature": {
      "returnType": "float",
      "name": "loopPhase",
      "parameters": "float time, float duration, float cycles, out float sine, out float cosine"
    }
  },
  {
    "id": "math/progress/ping-pong",
    "name": "Ping-Pong",
    "family": "math",
    "mode": "fragment",
    "description": "A value that goes from 0 to 1 and back to 0 in a loop, as fast one way as the other: a triangle wave. duration is the seconds of a whole trip, there and back, so it is at 1 at half the duration. Use it for a movement that goes back and forth; give its result to an easing snippet to soften the turns. Where Loop Phase starts again at 0, this one comes back down: no jump.",
    "signature": {
      "returnType": "float",
      "name": "pingPong",
      "parameters": "float time, float duration"
    }
  },
  {
    "id": "math/progress/spring",
    "name": "Spring",
    "family": "math",
    "mode": "fragment",
    "description": "A value that goes to 1 as if pulled by a spring, from time = 0: it overshoots, swings back and settles. frequency is the swings per second when nothing damps them; damping is how fast they die: 0 never stops, a small value (0.1 to 0.4) swings several times, 1 settles with no overshoot, and more is the same as 1. It is 0 before the start. Give it the time since something started (Delay gives it).",
    "signature": {
      "returnType": "float",
      "name": "springProgress",
      "parameters": "float time, float frequency, float damping"
    }
  },
  {
    "id": "math/progress/staggered-progress",
    "name": "Staggered Progress",
    "family": "math",
    "mode": "fragment",
    "description": "The progress, from 0 to 1, of one item among many that start one after the other: item number index starts delay seconds after the one before it and takes duration seconds. Use it for the letters of a title, the bars of a chart, the tiles of a wall.",
    "signature": {
      "returnType": "float",
      "name": "staggeredProgress",
      "parameters": "float time, float index, float delay, float duration"
    }
  },
  {
    "id": "math/random/random-float",
    "name": "Random Float",
    "family": "math",
    "mode": "fragment",
    "description": "A random number between minValue and maxValue, from a seed. The same seed always gives the same number and another seed another one, on every graphics card, so a picture does not flicker: to draw a new number, change the seed (combine it with the number of the cell or the index of the item, for instance seed × 10 + index, so that two seeds never share one). To get several unrelated numbers from one seed, give each its own: seed, seed + 1, seed + 2.",
    "signature": {
      "returnType": "float",
      "name": "randomFloat",
      "parameters": "float seed, float minValue, float maxValue"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-11"
    ]
  },
  {
    "id": "math/random/random-vec2",
    "name": "Random Vec2",
    "family": "math",
    "mode": "fragment",
    "description": "A random 2D vector from a seed, each component between its own minValue and maxValue (a position, an offset, a direction before it is normalized). The same seed always gives the same vector, on every graphics card: to draw a new one, change the seed. To get several unrelated vectors from one seed, give each its own: seed, seed + 1, seed + 2.",
    "signature": {
      "returnType": "vec2",
      "name": "randomVec2",
      "parameters": "float seed, vec2 minValue, vec2 maxValue"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-21"
    ]
  },
  {
    "id": "math/random/random-vec3",
    "name": "Random Vec3",
    "family": "math",
    "mode": "fragment",
    "description": "A random 3D vector from a seed, each component between its own minValue and maxValue: a color (each channel in its own range), a position, a direction. The same seed always gives the same vector, on every graphics card: to draw a new one, change the seed. To get several unrelated vectors from one seed, give each its own: seed, seed + 1, seed + 2. To make a random palette, give each of the four vectors of a Cosine Palette a Random Vec3 with a range that keeps the colors in 0 to 1 (offset 0.4 to 0.6, amplitude 0.3 to 0.4, frequency 0.5 to 2, phase 0 to 1).",
    "signature": {
      "returnType": "vec3",
      "name": "randomVec3",
      "parameters": "float seed, vec3 minValue, vec3 maxValue"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-31"
    ]
  },
  {
    "id": "math/random/random-vec4",
    "name": "Random Vec4",
    "family": "math",
    "mode": "fragment",
    "description": "A random 4D vector from a seed, each component between its own minValue and maxValue: a color with its alpha, a quaternion before it is normalized. The same seed always gives the same vector, on every graphics card: to draw a new one, change the seed. To get several unrelated vectors from one seed, give each its own: seed, seed + 1, seed + 2.",
    "signature": {
      "returnType": "vec4",
      "name": "randomVec4",
      "parameters": "float seed, vec4 minValue, vec4 maxValue"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-31",
      "noise-and-patterns/noise/hash-11"
    ]
  },
  {
    "id": "math/remap",
    "name": "Remap",
    "family": "math",
    "mode": "fragment",
    "description": "Maps a value from one range into another.",
    "signature": {
      "returnType": "float",
      "name": "remap",
      "parameters": "float value, float inMin, float inMax, float outMin, float outMax"
    }
  },
  {
    "id": "math/safe-divide",
    "name": "Safe Divide",
    "family": "math",
    "mode": "fragment",
    "description": "Performs a safe division, avoiding division by zero.",
    "signature": {
      "returnType": "vec3",
      "name": "safeDivide",
      "parameters": "vec3 a, vec3 b"
    }
  },
  {
    "id": "math/sinc",
    "name": "Sinc Function",
    "family": "math",
    "mode": "fragment",
    "description": "Normalized sinc function used for signal reconstruction, filtering and interpolation.",
    "signature": {
      "returnType": "float",
      "name": "sinc",
      "parameters": "float x"
    }
  },
  {
    "id": "math/vectors/reflect-vector",
    "name": "Reflect",
    "family": "math",
    "mode": "fragment",
    "description": "Reflects an incident vector around a normal vector, as used for specular reflection direction.",
    "signature": {
      "returnType": "vec3",
      "name": "reflectVector",
      "parameters": "vec3 incident, vec3 normal"
    }
  },
  {
    "id": "noise-and-patterns/noise/curl-noise-2d",
    "name": "Curl Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "A flow field: a direction at each point, drawn from FBM Simplex 2D, that swirls and never gathers or empties (the slope of the noise, turned a quarter of a turn). Move the point with the time to make it flow. The vector is mostly between -3 and 3: multiply it by a small amount (0.01 to 0.05) to displace the coordinates of an image (a liquid, glass-like look), or to give Echo Trail its direction. Same inputs as FBM Simplex 2D.",
    "signature": {
      "returnType": "vec2",
      "name": "curlNoise2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/fbm-simplex-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/domain-warp",
    "name": "Domain Warp 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Warps texture coordinates using procedural noise to create flowing and distorted patterns. Domain warping is commonly used to produce marble, lava, clouds, and organic effects.",
    "signature": {
      "returnType": "vec2",
      "name": "domainWarp2d",
      "parameters": "vec2 p, vec2 q, float strength"
    },
    "formerIds": [
      "fractal/domain-warp",
      "noise/domain-warp"
    ]
  },
  {
    "id": "noise-and-patterns/noise/domain-warp-fbm-2d",
    "name": "Domain Warp 2D (FBM)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Domain warping (two nested layers): coordinates are displaced by FBM value noise 2D before the final FBM is evaluated, giving fluid, marbled patterns. strength scales the displacement (about 1 to 4). seed is added to p to vary the pattern without changing its look; use vec2(0.0) for none. Output in [0, 1]. Costs 4 FBM evaluations. octaves is clamped to 12.",
    "signature": {
      "returnType": "vec2",
      "name": "domainWarpFbm2d",
      "parameters": "vec2 p, float strength, int octaves, float lacunarity, float gain, vec2 seed"
    },
    "dependencies": [
      "noise-and-patterns/noise/fbm-value-2d"
    ],
    "formerIds": [
      "noise/domain-warp-fbm-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-perlin-2d",
    "name": "FBM Perlin 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on Perlin noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmPerlin2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/perlin-noise-2d"
    ],
    "formerIds": [
      "noise/fbm-perlin-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-perlin-3d",
    "name": "FBM Perlin 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on Perlin noise 3D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 8. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmPerlin3d",
      "parameters": "vec3 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/perlin-noise-3d"
    ],
    "formerIds": [
      "noise/fbm-perlin-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-simplex-2d",
    "name": "FBM Simplex 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on simplex noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmSimplex2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/simplex-noise-2d"
    ],
    "formerIds": [
      "noise/fbm-simplex-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-simplex-3d",
    "name": "FBM Simplex 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on simplex noise 3D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 8. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmSimplex3d",
      "parameters": "vec3 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/simplex-noise-3d"
    ],
    "formerIds": [
      "noise/fbm-simplex-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-value-2d",
    "name": "FBM Value 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on value noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain. octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmValue2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d"
    ],
    "formerIds": [
      "noise/fbm-value-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-value-2d-derivatives",
    "name": "FBM Value 2D (Derivatives)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "FBM on value noise 2D with exact analytic derivatives. Returns vec3(value, d/dx, d/dy) with value in [0, 1]; the derivative is taken with respect to the input p (rotation and lacunarity of every octave are accounted for) and normalised like the value. Use it for normals and bump mapping. octaves is clamped to 12.",
    "signature": {
      "returnType": "vec3",
      "name": "fbmValue2dD",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d-derivatives"
    ],
    "formerIds": [
      "noise/fbm-value-2d-derivatives"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-value-2d-erosion",
    "name": "FBM Value 2D (Erosion)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "FBM with derivative-based damping: octave amplitude is reduced on steep slopes, giving an eroded terrain look (smooth valleys, detailed ridges). Built on value noise 2D with analytic derivatives. The derivative is accumulated raw on purpose (it acts as an erosion factor, not as a true gradient). Output in [0, 1], lower on steep areas. octaves is clamped to 12.",
    "signature": {
      "returnType": "float",
      "name": "fbmValue2dErosion",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d-derivatives"
    ],
    "formerIds": [
      "noise/fbm-value-2d-erosion"
    ]
  },
  {
    "id": "noise-and-patterns/noise/fbm-value-3d",
    "name": "FBM Value 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractional Brownian motion built on value noise 3D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain. octaves is clamped to 8. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "fbmValue3d",
      "parameters": "vec3 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-3d"
    ],
    "formerIds": [
      "noise/fbm-value-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-11",
    "name": "Hash 11 (1D → 1D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 1D input and returning a 1D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "float",
      "name": "hash11",
      "parameters": "float p"
    },
    "formerIds": [
      "noise/hash-11"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-12",
    "name": "Hash 12 (2D → 1D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 2D input and returning a 1D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "float",
      "name": "hash12",
      "parameters": "vec2 p"
    },
    "formerIds": [
      "noise/hash-12"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-13",
    "name": "Hash 13 (3D → 1D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 3D input and returning a 1D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "float",
      "name": "hash13",
      "parameters": "vec3 p3"
    },
    "formerIds": [
      "noise/hash-13"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-21",
    "name": "Hash 21 (1D → 2D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 1D input and returning a 2D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec2",
      "name": "hash21",
      "parameters": "float p"
    },
    "formerIds": [
      "noise/hash-21"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-22",
    "name": "Hash 22 (2D → 2D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 2D input and returning a 2D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec2",
      "name": "hash22",
      "parameters": "vec2 p"
    },
    "formerIds": [
      "noise/hash-22"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-23",
    "name": "Hash 23 (3D → 2D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 3D input and returning a 2D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec2",
      "name": "hash23",
      "parameters": "vec3 p3"
    },
    "formerIds": [
      "noise/hash-23"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-31",
    "name": "Hash 31 (1D → 3D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 1D input and returning a 3D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec3",
      "name": "hash31",
      "parameters": "float p"
    },
    "formerIds": [
      "noise/hash-31"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-32",
    "name": "Hash 32 (2D → 3D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 2D input and returning a 3D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec3",
      "name": "hash32",
      "parameters": "vec2 p"
    },
    "formerIds": [
      "noise/hash-32"
    ]
  },
  {
    "id": "noise-and-patterns/noise/hash-33",
    "name": "Hash 33 (3D → 3D)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Sine-free hash (David Hoskins) taking a 3D input and returning a 3D value. Each component is in [0, 1[. Naming: hash<outputs><inputs>. Stable across GPUs, but precision degrades for very large inputs (beyond a few thousand): keep coordinates bounded.",
    "signature": {
      "returnType": "vec3",
      "name": "hash33",
      "parameters": "vec3 p3"
    },
    "formerIds": [
      "noise/hash-33"
    ]
  },
  {
    "id": "noise-and-patterns/noise/loop-fbm-2d",
    "name": "Loop FBM 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Fractal noise 2D that moves and comes back to where it began, from 0 to 1: layers of Loop Value Noise 2D. octaves, lacunarity (how much finer each layer is) and gain (how much each weighs) are as in any FBM. timeLacunarity is how many times faster each layer moves; the cells of every layer are rounded to a whole number, which is what makes the loop hold, so a time lacunarity of 2 doubles the cells and 1 keeps them. Give it the phase of a loop (Loop Phase): the noise at its end is the one at its start.",
    "signature": {
      "returnType": "float",
      "name": "loopFbm2d",
      "parameters": "vec2 p, float phase, float cells, int octaves, float lacunarity, float timeLacunarity, float gain, float smoothness"
    },
    "dependencies": [
      "noise-and-patterns/noise/loop-value-noise-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/loop-value-noise-2d",
    "name": "Loop Value Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Value noise 2D that moves and comes back to where it began, from 0 to 1. Give it the phase of a loop (Loop Phase) and the noise at the end of the loop is the one at its start, so a video of that length repeats without a jump. cells is how many noise cells the loop crosses in time, rounded to a whole number (more is faster and busier); smoothness goes from straight lines between the cells (0) to a soft curve (1). The space is not tiled: only time goes round. The noise changes by itself as the phase goes, so no time input is needed.",
    "signature": {
      "returnType": "float",
      "name": "loopValueNoise2d",
      "parameters": "vec2 p, float phase, float cells, float smoothness"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-13"
    ]
  },
  {
    "id": "noise-and-patterns/noise/perlin-noise-2d",
    "name": "Perlin Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Gradient (Perlin) noise 2D with random unit gradients and the quintic fade curve (C2 continuous). Signed output, rescaled to cover about [-1, 1], centred on 0.",
    "signature": {
      "returnType": "float",
      "name": "perlinNoise2d",
      "parameters": "vec2 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-12"
    ],
    "formerIds": [
      "noise/perlin-noise-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/perlin-noise-3d",
    "name": "Perlin Noise 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Gradient (Perlin) noise 3D with random unit gradients and the quintic fade curve (C2 continuous). Signed output, rescaled to cover about [-1, 1], centred on 0. Use the third axis for animation.",
    "signature": {
      "returnType": "float",
      "name": "perlinNoise3d",
      "parameters": "vec3 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-33"
    ],
    "formerIds": [
      "noise/perlin-noise-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/ridged-fbm-perlin-2d",
    "name": "Ridged FBM Perlin 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Ridged multifractal-style FBM (1 - |n|, squared) built on Perlin noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "ridgedFbmPerlin2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/perlin-noise-2d"
    ],
    "formerIds": [
      "noise/ridged-fbm-perlin-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/ridged-fbm-value-2d",
    "name": "Ridged FBM Value 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Ridged multifractal-style FBM (1 - |n|, squared) built on value noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain. octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "ridgedFbmValue2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d"
    ],
    "formerIds": [
      "noise/ridged-fbm-value-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/simplex-noise-2d",
    "name": "Simplex Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Simplex noise 2D (skewed triangular grid, 3 corners per sample) with random gradients. Fewer directional artefacts than Perlin. Signed output, about [-1, 1], centred on 0.",
    "signature": {
      "returnType": "float",
      "name": "simplexNoise2d",
      "parameters": "vec2 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-22"
    ],
    "formerIds": [
      "noise/simplex-noise-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/simplex-noise-3d",
    "name": "Simplex Noise 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Simplex noise 3D (skewed tetrahedral grid, 4 corners per sample) with random gradients. Fewer directional artefacts than Perlin 3D. Signed output, about [-1, 1], centred on 0. Use the third axis for animation.",
    "signature": {
      "returnType": "float",
      "name": "simplexNoise3d",
      "parameters": "vec3 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-33"
    ],
    "formerIds": [
      "noise/simplex-noise-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/sine-to-stripes",
    "name": "Sine To Stripes",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Generates repeating stripes from a sine wave with adjustable edge sharpness.",
    "signature": {
      "returnType": "float",
      "name": "sineToStripes",
      "parameters": "float x, float contrast"
    },
    "formerIds": [
      "patterns/sine-to-stripes"
    ]
  },
  {
    "id": "noise-and-patterns/noise/turbulence-perlin-2d",
    "name": "Turbulence Perlin 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Turbulence (sum of |n| per octave) built on Perlin noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain (the signed base noise is remapped to [0, 1]). octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "turbulencePerlin2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/perlin-noise-2d"
    ],
    "formerIds": [
      "noise/turbulence-perlin-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/turbulence-value-2d",
    "name": "Turbulence Value 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Turbulence (sum of |n| per octave) built on value noise 2D, normalised by the sum of amplitudes. Output in [0, 1] regardless of octaves/gain. octaves is clamped to 12. Octaves are rotated and offset to avoid grid alignment.",
    "signature": {
      "returnType": "float",
      "name": "turbulenceValue2d",
      "parameters": "vec2 p, int octaves, float lacunarity, float gain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d"
    ],
    "formerIds": [
      "noise/turbulence-value-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/value-noise-2d",
    "name": "Value Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Value noise 2D: bilinear interpolation of random corner values with a cubic smoothstep. Output in [0, 1]. Fast, but with a grid-aligned look compared to gradient noise.",
    "signature": {
      "returnType": "float",
      "name": "noise2d",
      "parameters": "vec2 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-12"
    ],
    "formerIds": [
      "noise/value-noise-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/value-noise-2d-derivatives",
    "name": "Value Noise 2D (Derivatives)",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Value noise 2D with analytic derivatives. Returns vec3(value, d/dx, d/dy) with value in [0, 1] (identical to noise2d). Derivatives are exact with respect to p, cubic smoothstep term included.",
    "signature": {
      "returnType": "vec3",
      "name": "noise2dD",
      "parameters": "vec2 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-12"
    ],
    "formerIds": [
      "noise/value-noise-2d-derivatives"
    ]
  },
  {
    "id": "noise-and-patterns/noise/value-noise-3d",
    "name": "Value Noise 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Value noise 3D: trilinear interpolation of random corner values with a cubic smoothstep. Output in [0, 1]. Use the third axis for animation.",
    "signature": {
      "returnType": "float",
      "name": "valueNoise3d",
      "parameters": "vec3 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-13"
    ],
    "formerIds": [
      "noise/value-noise-3d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/worley-noise-2d",
    "name": "Worley Noise 2D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Worley (cellular) noise 2D. Returns vec2(F1, F2): distances to the nearest and second nearest feature points (not squared). F1 is roughly in [0, 1], F2 in [0, 1.5]. Use F2 - F1 for cell borders.",
    "signature": {
      "returnType": "vec2",
      "name": "worleyNoise2d",
      "parameters": "vec2 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-22"
    ],
    "formerIds": [
      "noise/worley-noise-2d"
    ]
  },
  {
    "id": "noise-and-patterns/noise/worley-noise-3d",
    "name": "Worley Noise 3D",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Worley (cellular) noise 3D. Returns vec2(F1, F2): distances to the nearest and second nearest feature points (not squared). F1 is roughly in [0, 1], F2 in [0, 1.5]. Use the third axis for animation.",
    "signature": {
      "returnType": "vec2",
      "name": "worleyNoise3d",
      "parameters": "vec3 p"
    },
    "dependencies": [
      "noise-and-patterns/noise/hash-33"
    ],
    "formerIds": [
      "noise/worley-noise-3d"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/albedo",
    "name": "Terrain Albedo",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Terrain color by altitude and slope: low -> mid between seaLevel and snowLine, rock on steep slopes, snow above snowLine (less on slopes).",
    "signature": {
      "returnType": "vec3",
      "name": "terrainAlbedo",
      "parameters": "vec3 position, vec3 normal, float seaLevel, float snowLine, vec3 low, vec3 mid, vec3 rock, vec3 snow"
    },
    "formerIds": [
      "terrain/albedo"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/ao",
    "name": "Terrain Ambient Occlusion",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Terrain ambient occlusion: 5 samples along the normal compared to the height field. Returns 1 (open) .. 0 (crevice). radius = occlusion reach in world units.",
    "signature": {
      "returnType": "float",
      "name": "terrainAO",
      "parameters": "vec3 position, vec3 normal, float radius, vec4 terrain"
    },
    "dependencies": [
      "noise-and-patterns/terrain/height"
    ],
    "formerIds": [
      "terrain/ao"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/height",
    "name": "Terrain Height",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Procedural terrain height at (x, z), built on eroded value-noise fbm (identical to fbmValue2dErosion at erosion = 1). terrain = (scale, amplitude, octaves, erosion): scale = base frequency, amplitude = max height, octaves 1..8, erosion 0 = plain fbm, 1 = eroded (slopes smoothed, detail kept in the hollows), higher = smoother slopes.",
    "signature": {
      "returnType": "float",
      "name": "terrainHeight",
      "parameters": "vec2 p, vec4 terrain"
    },
    "dependencies": [
      "noise-and-patterns/noise/value-noise-2d-derivatives"
    ],
    "formerIds": [
      "terrain/height"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/march",
    "name": "Terrain March",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Height-field ray march with relaxed steps and linear refinement at the hit. Returns the distance t, or -1.0 on a miss. relax 0.3..0.8 (lower = safer, slower). The minimum step grows with t, so the cost stays stable in the distance.",
    "signature": {
      "returnType": "float",
      "name": "terrainMarch",
      "parameters": "vec3 origin, vec3 direction, float tMin, float tMax, float relax, vec4 terrain"
    },
    "dependencies": [
      "noise-and-patterns/terrain/height"
    ],
    "formerIds": [
      "terrain/march"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/normal",
    "name": "Terrain Normal",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Terrain normal by central differences on terrainHeight. eps should grow with distance (e.g. 0.0005 * t) to avoid shimmering in the distance.",
    "signature": {
      "returnType": "vec3",
      "name": "terrainNormal",
      "parameters": "vec2 p, float eps, vec4 terrain"
    },
    "dependencies": [
      "noise-and-patterns/terrain/height"
    ],
    "formerIds": [
      "terrain/normal"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/normal-from-heights",
    "name": "Normal From Heights",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Height-field normal from 4 samples (left, right, down, up along x/z) spaced by eps. Works with any height built from nodes.",
    "signature": {
      "returnType": "vec3",
      "name": "normalFromHeights",
      "parameters": "float heightLeft, float heightRight, float heightDown, float heightUp, float eps"
    },
    "formerIds": [
      "terrain/normal-from-heights"
    ]
  },
  {
    "id": "noise-and-patterns/terrain/shadow",
    "name": "Terrain Soft Shadow",
    "family": "noise-and-patterns",
    "mode": "fragment",
    "description": "Soft shadow cast by the terrain toward the light. Returns 0 (shadow) .. 1 (lit). hardness 4 = very soft, 32 = sharp. Start from position + normal * small offset.",
    "signature": {
      "returnType": "float",
      "name": "terrainSoftShadow",
      "parameters": "vec3 origin, vec3 lightDirection, float tMin, float tMax, float hardness, vec4 terrain"
    },
    "dependencies": [
      "noise-and-patterns/terrain/height"
    ],
    "formerIds": [
      "terrain/shadow"
    ]
  },
  {
    "id": "shapes/2d/arc",
    "name": "SDF Arc",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an arc with rounded ends. The aperture is given as vec2(sin, cos) of its half angle.",
    "signature": {
      "returnType": "float",
      "name": "sdArc",
      "parameters": "vec2 p, vec2 sinCosAperture, float radius, float thickness"
    },
    "formerIds": [
      "SDF/2D/arc"
    ]
  },
  {
    "id": "shapes/2d/capsule",
    "name": "SDF Capsule (2D)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a capsule shape.",
    "signature": {
      "returnType": "float",
      "name": "sdCapsule2d",
      "parameters": "vec2 p, vec2 start, vec2 end, float radius"
    },
    "formerIds": [
      "sdf-shapes/capsule",
      "SDF/2D/capsule",
      "sdf/shapes/capsule"
    ]
  },
  {
    "id": "shapes/2d/chamfer-box",
    "name": "SDF Chamfer Box",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a rectangle with cut corners.",
    "signature": {
      "returnType": "float",
      "name": "sdChamferBox",
      "parameters": "vec2 p, vec2 halfSize, float chamfer"
    },
    "formerIds": [
      "SDF/2D/chamfer-box"
    ]
  },
  {
    "id": "shapes/2d/circle",
    "name": "SDF Circle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a circle primitive.",
    "signature": {
      "returnType": "float",
      "name": "sdCircle",
      "parameters": "vec2 p, float radius"
    },
    "formerIds": [
      "sdf-shapes/circle",
      "SDF/2D/circle",
      "sdf/shapes/circle"
    ]
  },
  {
    "id": "shapes/2d/cross",
    "name": "SDF Cross",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a cross. Exact outside, a bound inside.",
    "signature": {
      "returnType": "float",
      "name": "sdCross",
      "parameters": "vec2 p, vec2 halfSize, float roundness"
    },
    "formerIds": [
      "SDF/2D/cross"
    ]
  },
  {
    "id": "shapes/2d/cut-disk",
    "name": "SDF Cut Disk",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a disk cut by a horizontal line at the given height.",
    "signature": {
      "returnType": "float",
      "name": "sdCutDisk",
      "parameters": "vec2 p, float radius, float height"
    },
    "formerIds": [
      "SDF/2D/cut-disk"
    ]
  },
  {
    "id": "shapes/2d/egg",
    "name": "SDF Egg",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an egg: two circles of different radii joined by two larger arcs.",
    "signature": {
      "returnType": "float",
      "name": "sdEgg",
      "parameters": "vec2 p, float height, float bottomRadius, float topRadius, float bulge"
    },
    "formerIds": [
      "SDF/2D/egg"
    ]
  },
  {
    "id": "shapes/2d/ellipse",
    "name": "SDF Ellipse",
    "family": "shapes",
    "mode": "fragment",
    "description": "Exact signed distance function for an ellipse.",
    "signature": {
      "returnType": "float",
      "name": "sdEllipse",
      "parameters": "vec2 p, vec2 radii"
    },
    "formerIds": [
      "SDF/2D/ellipse"
    ]
  },
  {
    "id": "shapes/2d/equilateral-triangle",
    "name": "SDF Equilateral Triangle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an equilateral triangle.",
    "signature": {
      "returnType": "float",
      "name": "sdEquilateralTriangle",
      "parameters": "vec2 p, float size"
    },
    "formerIds": [
      "sdf-shapes/triangle",
      "SDF/2D/equilateral-triangle",
      "SDF/shapes/equilateral-triangle",
      "sdf/shapes/triangle"
    ]
  },
  {
    "id": "shapes/2d/flower",
    "name": "SDF Flower",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a flower shape.",
    "signature": {
      "returnType": "float",
      "name": "sdFlower",
      "parameters": "vec2 p, float r1, float r2, int points"
    },
    "formerIds": [
      "sdf-shapes/flower",
      "SDF/2D/flower",
      "sdf/shapes/flower"
    ]
  },
  {
    "id": "shapes/2d/heart",
    "name": "SDF Heart",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a heart of unit size, with its point at the origin. Scale and move p to place it.",
    "signature": {
      "returnType": "float",
      "name": "sdHeart",
      "parameters": "vec2 p"
    },
    "formerIds": [
      "SDF/2D/heart"
    ]
  },
  {
    "id": "shapes/2d/horse-shoe",
    "name": "SDF Horseshoe (2D)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a horseshoe. The aperture is given as vec2(sin, cos) of its half angle, the size is the thickness and the length of the ends.",
    "signature": {
      "returnType": "float",
      "name": "sdHorseshoe2d",
      "parameters": "vec2 p, vec2 sinCosAperture, float radius, vec2 size"
    },
    "formerIds": [
      "SDF/2D/horse-shoe",
      "SDF/2D/horseshoe"
    ]
  },
  {
    "id": "shapes/2d/isosceles-trapezoid",
    "name": "SDF Isosceles Trapezoid",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an isosceles trapezoid.",
    "signature": {
      "returnType": "float",
      "name": "sdTrapezoid",
      "parameters": "vec2 p, float bottomRadius, float topRadius, float halfHeight"
    },
    "formerIds": [
      "SDF/2D/isosceles-trapezoid"
    ]
  },
  {
    "id": "shapes/2d/isosceles-triangle",
    "name": "SDF Isosceles Triangle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an isosceles triangle: size is half the base and the height.",
    "signature": {
      "returnType": "float",
      "name": "sdIsoscelesTriangle",
      "parameters": "vec2 p, vec2 size"
    },
    "formerIds": [
      "SDF/2D/isosceles-triangle"
    ]
  },
  {
    "id": "shapes/2d/moon",
    "name": "SDF Moon",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a crescent: a disk with a second disk cut out of it.",
    "signature": {
      "returnType": "float",
      "name": "sdMoon",
      "parameters": "vec2 p, float offset, float outerRadius, float innerRadius"
    },
    "formerIds": [
      "SDF/2D/moon"
    ]
  },
  {
    "id": "shapes/2d/oriented-box",
    "name": "SDF Oriented Box",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a rectangle drawn along a segment, with a given thickness.",
    "signature": {
      "returnType": "float",
      "name": "sdOrientedBox",
      "parameters": "vec2 p, vec2 start, vec2 end, float thickness"
    },
    "formerIds": [
      "SDF/2D/oriented-box"
    ]
  },
  {
    "id": "shapes/2d/parabola",
    "name": "SDF Parabola",
    "family": "shapes",
    "mode": "fragment",
    "description": "Exact signed distance function for the parabola y = curvature * x^2.",
    "signature": {
      "returnType": "float",
      "name": "sdParabola",
      "parameters": "vec2 p, float curvature"
    },
    "formerIds": [
      "SDF/2D/parabola"
    ]
  },
  {
    "id": "shapes/2d/parallelogram",
    "name": "SDF Parallelogram",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a parallelogram.",
    "signature": {
      "returnType": "float",
      "name": "sdParallelogram",
      "parameters": "vec2 p, float halfWidth, float halfHeight, float skew"
    },
    "formerIds": [
      "SDF/2D/parallelogram"
    ]
  },
  {
    "id": "shapes/2d/pie",
    "name": "SDF Pie",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a circular sector. The aperture is given as vec2(sin, cos) of its half angle.",
    "signature": {
      "returnType": "float",
      "name": "sdPie",
      "parameters": "vec2 p, vec2 sinCosAperture, float radius"
    },
    "formerIds": [
      "SDF/2D/pie"
    ]
  },
  {
    "id": "shapes/2d/quad",
    "name": "SDF Quad (2D)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for any four-sided shape, given its four corners in order (clockwise or not, convex or not). Negative inside, positive outside. Corners that are not a rectangle or a parallelogram make shapes the other 2D snippets cannot: a wedge, a slanted band, the ends of a ribbon.",
    "signature": {
      "returnType": "float",
      "name": "sdQuad2d",
      "parameters": "vec2 p, vec2 a, vec2 b, vec2 c, vec2 d"
    }
  },
  {
    "id": "shapes/2d/quadratic-bezier",
    "name": "SDF Quadratic Bezier",
    "family": "shapes",
    "mode": "fragment",
    "description": "Unsigned distance function to a quadratic Bezier curve given by its three points.",
    "signature": {
      "returnType": "float",
      "name": "sdBezier",
      "parameters": "vec2 p, vec2 pointA, vec2 pointB, vec2 pointC"
    },
    "formerIds": [
      "SDF/2D/quadratic-bezier"
    ]
  },
  {
    "id": "shapes/2d/rectangle",
    "name": "SDF Rectangle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an axis aligned rectangle.",
    "signature": {
      "returnType": "float",
      "name": "sdRect",
      "parameters": "vec2 p, vec2 size"
    },
    "formerIds": [
      "sdf-shapes/box",
      "SDF/2D/box",
      "SDF/2D/rectangle",
      "sdf/shapes/box"
    ]
  },
  {
    "id": "shapes/2d/regular-polygon",
    "name": "SDF Regular Polygon",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a regular polygon.",
    "signature": {
      "returnType": "float",
      "name": "sdRegularPolygon",
      "parameters": "vec2 p, int sides, float radius"
    },
    "formerIds": [
      "sdf-shapes/polygon",
      "SDF/2D/regular-polygon",
      "sdf/shapes/polygon",
      "SDF/shapes/regular-polygon"
    ]
  },
  {
    "id": "shapes/2d/regular-star",
    "name": "SDF Regular Star",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a star with any number of points.",
    "signature": {
      "returnType": "float",
      "name": "sdRegularStar",
      "parameters": "vec2 p, float radius, int points, float sharpness"
    },
    "formerIds": [
      "SDF/2D/regular-star"
    ]
  },
  {
    "id": "shapes/2d/rhombus",
    "name": "SDF Rhombus (2D)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a rhombus.",
    "signature": {
      "returnType": "float",
      "name": "sdRhombus2d",
      "parameters": "vec2 p, vec2 halfDiagonals"
    },
    "formerIds": [
      "SDF/2D/rhombus"
    ]
  },
  {
    "id": "shapes/2d/ring",
    "name": "SDF Ring",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a ring sector: an arc with flat ends. The aperture is given as vec2(sin, cos) of its half angle.",
    "signature": {
      "returnType": "float",
      "name": "sdRing",
      "parameters": "vec2 p, vec2 sinCosAperture, float radius, float thickness"
    },
    "formerIds": [
      "SDF/2D/ring"
    ]
  },
  {
    "id": "shapes/2d/rounded-rectangle",
    "name": "SDF Rounded Rectangle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a rounded rectangle.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundedRect",
      "parameters": "vec2 p, vec2 size, float radius"
    },
    "formerIds": [
      "sdf-shapes/rounded-box",
      "SDF/2D/rounded-box",
      "SDF/2D/rounded-rectangle",
      "sdf/shapes/rounded-box"
    ]
  },
  {
    "id": "shapes/2d/rounded-x",
    "name": "SDF Rounded X",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an X with rounded ends.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundedX",
      "parameters": "vec2 p, float width, float radius"
    },
    "formerIds": [
      "SDF/2D/rounded-x"
    ]
  },
  {
    "id": "shapes/2d/segment",
    "name": "SDF Segment",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a line segment.",
    "signature": {
      "returnType": "float",
      "name": "sdSegment",
      "parameters": "vec2 p, vec2 a, vec2 b, float thickness"
    },
    "formerIds": [
      "sdf-shapes/segment",
      "SDF/2D/segment",
      "sdf/shapes/segment"
    ]
  },
  {
    "id": "shapes/2d/triangle",
    "name": "SDF Triangle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a triangle given by its three points.",
    "signature": {
      "returnType": "float",
      "name": "sdTriangle",
      "parameters": "vec2 p, vec2 a, vec2 b, vec2 c"
    },
    "formerIds": [
      "SDF/2D/triangle"
    ]
  },
  {
    "id": "shapes/2d/uneven-capsule",
    "name": "SDF Uneven Capsule",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a capsule with a different radius at each end.",
    "signature": {
      "returnType": "float",
      "name": "sdUnevenCapsule",
      "parameters": "vec2 p, float bottomRadius, float topRadius, float height"
    },
    "formerIds": [
      "SDF/2D/uneven-capsule"
    ]
  },
  {
    "id": "shapes/2d/vesica",
    "name": "SDF Vesica",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a vesica: the lens made by two overlapping circles.",
    "signature": {
      "returnType": "float",
      "name": "sdVesica",
      "parameters": "vec2 p, float halfWidth, float halfHeight"
    },
    "formerIds": [
      "SDF/2D/vesica"
    ]
  },
  {
    "id": "shapes/3d/box",
    "name": "SDF Box",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a box primitive.",
    "signature": {
      "returnType": "float",
      "name": "sdBox",
      "parameters": "vec3 p, vec3 halfSize"
    },
    "formerIds": [
      "SDF/3D/box"
    ]
  },
  {
    "id": "shapes/3d/box-frame",
    "name": "SDF Box Frame",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a 3D box frame.",
    "signature": {
      "returnType": "float",
      "name": "sdBoxFrame",
      "parameters": "vec3 p, vec3 halfSize, float thickness"
    },
    "formerIds": [
      "SDF/3D/box-frame"
    ]
  },
  {
    "id": "shapes/3d/capped-cone",
    "name": "SDF Capped Cone",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a capped cone.",
    "signature": {
      "returnType": "float",
      "name": "sdCappedCone",
      "parameters": "vec3 p, vec3 start, vec3 end, float radiusStart, float radiusEnd"
    },
    "formerIds": [
      "SDF/3D/capped-cone"
    ]
  },
  {
    "id": "shapes/3d/capped-torus",
    "name": "SDF Capped Torus",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a capped torus.",
    "signature": {
      "returnType": "float",
      "name": "sdCappedTorus",
      "parameters": "vec3 p, vec2 cutoff, float majorRadius, float minorRadius"
    },
    "formerIds": [
      "SDF/3D/capped-torus"
    ]
  },
  {
    "id": "shapes/3d/capsule",
    "name": "SDF Capsule",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a capsule.",
    "signature": {
      "returnType": "float",
      "name": "sdCapsule",
      "parameters": "vec3 p, vec3 start, vec3 end, float radius"
    },
    "formerIds": [
      "SDF/3D/capsule"
    ]
  },
  {
    "id": "shapes/3d/cone",
    "name": "SDF Cone",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a cone.",
    "signature": {
      "returnType": "float",
      "name": "sdCone",
      "parameters": "vec3 p, float angle, float height"
    },
    "formerIds": [
      "SDF/3D/cone"
    ]
  },
  {
    "id": "shapes/3d/cut-hollow-sphere",
    "name": "SDF Cut Hollow Sphere",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a hollow sphere shell, cut by a horizontal plane at the given height.",
    "signature": {
      "returnType": "float",
      "name": "sdCutHollowSphere",
      "parameters": "vec3 p, float radius, float height, float thickness"
    },
    "formerIds": [
      "SDF/3D/cut-hollow-sphere"
    ]
  },
  {
    "id": "shapes/3d/cut-sphere",
    "name": "SDF Cut Sphere",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a sphere cut by a horizontal plane at the given height.",
    "signature": {
      "returnType": "float",
      "name": "sdCutSphere",
      "parameters": "vec3 p, float radius, float height"
    },
    "formerIds": [
      "SDF/3D/cut-sphere"
    ]
  },
  {
    "id": "shapes/3d/cylinder",
    "name": "SDF Cylinder",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a cylinder.",
    "signature": {
      "returnType": "float",
      "name": "sdCylinder",
      "parameters": "vec3 p, vec3 start, vec3 end, float radius"
    },
    "formerIds": [
      "SDF/3D/cylinder"
    ]
  },
  {
    "id": "shapes/3d/ellipsoid",
    "name": "SDF Ellipsoid",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an ellipsoid.",
    "signature": {
      "returnType": "float",
      "name": "sdEllipsoid",
      "parameters": "vec3 p, float radiusX, float radiusY, float radiusZ"
    },
    "formerIds": [
      "SDF/3D/ellipsoid"
    ]
  },
  {
    "id": "shapes/3d/hexagon-prism",
    "name": "SDF Hexagon Prism",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a hexagonal prism.",
    "signature": {
      "returnType": "float",
      "name": "sdHexPrism",
      "parameters": "vec3 p, float radius, float height"
    },
    "formerIds": [
      "SDF/3D/hex-prism",
      "SDF/3D/hexagon-prism"
    ]
  },
  {
    "id": "shapes/3d/horse-shoe",
    "name": "SDF Horse Shoe",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a 3D horse shoe shape.",
    "signature": {
      "returnType": "float",
      "name": "sdHorseshoe",
      "parameters": "vec3 p, float angle, float radius, float lgth, float thickness, float depth"
    },
    "formerIds": [
      "SDF/3D/horse-shoe"
    ]
  },
  {
    "id": "shapes/3d/infinite-cone",
    "name": "SDF Infinite Cone",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an infinite cone with its tip at the origin, opening downward. The angle is given as vec2(sin, cos).",
    "signature": {
      "returnType": "float",
      "name": "sdInfiniteCone",
      "parameters": "vec3 p, vec2 sinCosAngle"
    },
    "formerIds": [
      "SDF/3D/infinite-cone"
    ]
  },
  {
    "id": "shapes/3d/infinite-cylinder",
    "name": "SDF Infinite Cylinder",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an infinite cylinder along Y, with its axis at the given position on the XZ plane.",
    "signature": {
      "returnType": "float",
      "name": "sdInfiniteCylinder",
      "parameters": "vec3 p, vec2 center, float radius"
    },
    "formerIds": [
      "SDF/3D/infinite-cylinder"
    ]
  },
  {
    "id": "shapes/3d/link",
    "name": "SDF Link",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a chain link: a torus stretched along Y.",
    "signature": {
      "returnType": "float",
      "name": "sdLink",
      "parameters": "vec3 p, float halfLength, float majorRadius, float minorRadius"
    },
    "formerIds": [
      "SDF/3D/link"
    ]
  },
  {
    "id": "shapes/3d/octagon-prism",
    "name": "SDF Octagon Prism",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an octagonal prism.",
    "signature": {
      "returnType": "float",
      "name": "sdOctagonPrism",
      "parameters": "vec3 p, float radius, float halfHeight"
    },
    "formerIds": [
      "SDF/3D/octagon-prism"
    ]
  },
  {
    "id": "shapes/3d/octahedron",
    "name": "SDF Octahedron",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for an octahedron.",
    "signature": {
      "returnType": "float",
      "name": "sdOctahedron",
      "parameters": "vec3 p, float size"
    },
    "formerIds": [
      "SDF/3D/octahedron"
    ]
  },
  {
    "id": "shapes/3d/plane",
    "name": "SDF Plane",
    "family": "shapes",
    "mode": "fragment",
    "description": "Returns the signed distance from a point to an infinite 3D plane.",
    "signature": {
      "returnType": "float",
      "name": "sdPlane",
      "parameters": "vec3 p, vec3 normal, float offset"
    },
    "formerIds": [
      "SDF/3D/plane"
    ]
  },
  {
    "id": "shapes/3d/pyramid",
    "name": "SDF Pyramid",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a pyramid.",
    "signature": {
      "returnType": "float",
      "name": "sdPyramid",
      "parameters": "vec3 p, float height"
    },
    "formerIds": [
      "SDF/3D/pyramid"
    ]
  },
  {
    "id": "shapes/3d/quad-unsigned",
    "name": "SDF Quad (Unsigned)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Unsigned distance function to a flat quad in 3D, given by its four points.",
    "signature": {
      "returnType": "float",
      "name": "udQuad",
      "parameters": "vec3 p, vec3 a, vec3 b, vec3 c, vec3 d"
    },
    "formerIds": [
      "SDF/3D/quad-unsigned"
    ]
  },
  {
    "id": "shapes/3d/rhombus",
    "name": "SDF Rhombus",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a rhombus.",
    "signature": {
      "returnType": "float",
      "name": "sdRhombus",
      "parameters": "vec3 p, float radiusX, float radiusZ, float halfHeight, float cornerRadius"
    },
    "formerIds": [
      "SDF/3D/rhombus"
    ]
  },
  {
    "id": "shapes/3d/round-cone",
    "name": "SDF Round Cone",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a round cone.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundCone",
      "parameters": "vec3 p, vec3 start, vec3 end, float radiusStart, float radiusEnd"
    },
    "formerIds": [
      "SDF/3D/round-cone"
    ]
  },
  {
    "id": "shapes/3d/round-cone-y",
    "name": "SDF Round Cone Y",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a round cone aligned along the Y axis.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundConeY",
      "parameters": "vec3 p, float bottomRadius, float topRadius, float height"
    },
    "formerIds": [
      "SDF/3D/round-cone-y"
    ]
  },
  {
    "id": "shapes/3d/rounded-box",
    "name": "SDF Rounded Box",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a 3D rounded box.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundedBox",
      "parameters": "vec3 p, vec3 halfSize, float radius"
    },
    "formerIds": [
      "SDF/3D/rounded-box"
    ]
  },
  {
    "id": "shapes/3d/rounded-cylinder",
    "name": "SDF Rounded Cylinder",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a cylinder along Y with rounded edges.",
    "signature": {
      "returnType": "float",
      "name": "sdRoundedCylinder",
      "parameters": "vec3 p, float radius, float cornerRadius, float halfHeight"
    },
    "formerIds": [
      "SDF/3D/rounded-cylinder"
    ]
  },
  {
    "id": "shapes/3d/solid-angle",
    "name": "SDF Solid Angle",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a solid angle.",
    "signature": {
      "returnType": "float",
      "name": "sdSolidAngle",
      "parameters": "vec3 p, float angle, float radius"
    },
    "formerIds": [
      "SDF/3D/solid-angle"
    ]
  },
  {
    "id": "shapes/3d/sphere",
    "name": "SDF Sphere",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a sphere primitive.",
    "signature": {
      "returnType": "float",
      "name": "sdSphere",
      "parameters": "vec3 p, float radius"
    },
    "formerIds": [
      "SDF/3D/sphere"
    ]
  },
  {
    "id": "shapes/3d/torus",
    "name": "SDF Torus",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a 3D torus.",
    "signature": {
      "returnType": "float",
      "name": "sdTorus",
      "parameters": "vec3 p, float majorRadius, float minorRadius"
    },
    "formerIds": [
      "SDF/3D/torus"
    ]
  },
  {
    "id": "shapes/3d/triangle-unsigned",
    "name": "SDF Triangle (Unsigned)",
    "family": "shapes",
    "mode": "fragment",
    "description": "Unsigned distance function to a flat triangle in 3D, given by its three points.",
    "signature": {
      "returnType": "float",
      "name": "udTriangle",
      "parameters": "vec3 p, vec3 a, vec3 b, vec3 c"
    },
    "formerIds": [
      "SDF/3D/triangle-unsigned"
    ]
  },
  {
    "id": "shapes/3d/triangular-prism",
    "name": "SDF Triangular Prism",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a triangular prism.",
    "signature": {
      "returnType": "float",
      "name": "sdTriPrism",
      "parameters": "vec3 p, float radius, float height"
    },
    "formerIds": [
      "SDF/3D/triangular-prism"
    ]
  },
  {
    "id": "shapes/3d/u",
    "name": "SDF U",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a U shape.",
    "signature": {
      "returnType": "float",
      "name": "sdU",
      "parameters": "vec3 p, float radius, float lgth, vec2 thickness"
    },
    "formerIds": [
      "SDF/3D/u"
    ]
  },
  {
    "id": "shapes/3d/vesica-segment",
    "name": "SDF Vesica Segment",
    "family": "shapes",
    "mode": "fragment",
    "description": "Signed distance function for a lens (a vesica revolved around the segment between two points).",
    "signature": {
      "returnType": "float",
      "name": "sdVesicaSegment",
      "parameters": "vec3 p, vec3 start, vec3 end, float width"
    },
    "formerIds": [
      "SDF/3D/vesica-segment"
    ]
  },
  {
    "id": "shapes/operations/displace",
    "name": "SDF Displace",
    "family": "shapes",
    "mode": "fragment",
    "description": "Moves the surface of a signed distance by a height read from a texture or a noise, centred on 0.5: a height above 0.5 pushes the surface in, below it pushes it out. Keep the height smooth and the amount small, or the ray steps over the grain.",
    "signature": {
      "returnType": "float",
      "name": "sdOpDisplace",
      "parameters": "float d, float height, float amount"
    },
    "formerIds": [
      "SDF/operations/displace"
    ]
  },
  {
    "id": "shapes/operations/extrude",
    "name": "SDF Extrude",
    "family": "shapes",
    "mode": "fragment",
    "description": "Pulls a 2D signed distance (the distance to a shape in the xy plane) out along z into a solid of the given half depth, centred on z = 0.",
    "signature": {
      "returnType": "float",
      "name": "sdOpExtrude",
      "parameters": "float d2, float z, float halfDepth"
    },
    "formerIds": [
      "SDF/operations/extrude"
    ]
  },
  {
    "id": "shapes/operations/extrude-image",
    "name": "Extrude Image",
    "family": "shapes",
    "mode": "fragment",
    "description": "Pulls the shape of an image (its opacity) back as a solid: offset is the vector, in texture coordinates, from its front to its back. At each of 48 steps behind the picture the SDF Extrude snippet says whether the shape is still there, and the first step that is gives a wall, tinted by sideColor and darker the farther it is from the front; shine lights the walls near the front. Returns the picture over its walls.",
    "signature": {
      "returnType": "vec4",
      "name": "extrudeImage",
      "parameters": "sampler2D image, vec2 coord, vec2 offset, float shine, vec4 sideColor"
    },
    "dependencies": [
      "shapes/operations/extrude"
    ]
  },
  {
    "id": "shapes/operations/extruded-sdf-image",
    "name": "SDF Extruded Image",
    "family": "shapes",
    "mode": "fragment",
    "description": "A 2D signed distance stored in an image (the red channel, in units of space, negative inside the shape: draw it in a float pass) pulled out into a solid, as a 3D signed distance: halfDepth is half its thickness, edge rounds its edges. size is the width and the height of the picture in the same units, centered on the origin in the plane z = 0: draw the distance over a space larger than what the camera sees, so that a shape can grow past the screen. Make any 2D shape of the library a solid you can turn around: draw its distance in a pass, give the pass here. Use it with Raymarch Extruded SDF and Extruded SDF Normal.",
    "signature": {
      "returnType": "float",
      "name": "sdExtrudedImage",
      "parameters": "vec3 p, sampler2D sdf, vec2 size, float halfDepth, float edge"
    },
    "dependencies": [
      "shapes/operations/extrude",
      "shapes/operations/round"
    ]
  },
  {
    "id": "shapes/operations/intersection",
    "name": "SDF Intersection",
    "family": "shapes",
    "mode": "fragment",
    "description": "Combines two signed distance fields using an intersection operation.",
    "signature": {
      "returnType": "float",
      "name": "sdOpIntersection",
      "parameters": "float d1, float d2"
    },
    "formerIds": [
      "SDF/operations/intersection"
    ]
  },
  {
    "id": "shapes/operations/morph",
    "name": "SDF Morph",
    "family": "shapes",
    "mode": "fragment",
    "description": "Blends two signed distances: t = 0 gives the first shape, t = 1 the second. The result is no longer an exact distance but stays 1-Lipschitz, so a ray can still march it. To walk through more than two shapes, blend them two by two.",
    "signature": {
      "returnType": "float",
      "name": "sdOpMorph",
      "parameters": "float a, float b, float t"
    },
    "formerIds": [
      "SDF/operations/morph"
    ]
  },
  {
    "id": "shapes/operations/onion",
    "name": "SDF Onion",
    "family": "shapes",
    "mode": "fragment",
    "description": "Transforms a signed distance field into a hollow shell of a specified thickness around its surface.",
    "signature": {
      "returnType": "float",
      "name": "sdOpOnion",
      "parameters": "float d, float thickness"
    },
    "formerIds": [
      "SDF/operations/onion"
    ]
  },
  {
    "id": "shapes/operations/round",
    "name": "SDF Round",
    "family": "shapes",
    "mode": "fragment",
    "description": "Rounds the edges of a signed distance field.",
    "signature": {
      "returnType": "float",
      "name": "sdOpRound",
      "parameters": "float d, float radius"
    },
    "formerIds": [
      "SDF/operations/round"
    ]
  },
  {
    "id": "shapes/operations/slice",
    "name": "SDF Slice",
    "family": "shapes",
    "mode": "fragment",
    "description": "Cuts a 3D shape by a plane: keeps the part where dot(p, normal) < offset and removes the side the normal points to. The result is exact inside the shape and on the cut, a bound (never too large) outside near the cut edges, which is what raymarching needs.",
    "signature": {
      "returnType": "float",
      "name": "sdOpSlice",
      "parameters": "float d, vec3 p, vec3 normal, float offset"
    }
  },
  {
    "id": "shapes/operations/smooth-intersection",
    "name": "SDF Smooth Intersection",
    "family": "shapes",
    "mode": "fragment",
    "description": "Smoothly intersects two signed distance fields using a controllable smoothing radius.",
    "signature": {
      "returnType": "float",
      "name": "sdOpSmoothIntersection",
      "parameters": "float d1, float d2, float smoothness, bool cubic"
    },
    "dependencies": [
      "color/blend/smooth-max",
      "color/blend/smooth-max-cubic"
    ],
    "formerIds": [
      "SDF/operations/smooth-intersection"
    ]
  },
  {
    "id": "shapes/operations/smooth-subtraction",
    "name": "SDF Smooth Subtraction",
    "family": "shapes",
    "mode": "fragment",
    "description": "Smoothly subtracts the second signed distance field from the first using a controllable smoothing radius.",
    "signature": {
      "returnType": "float",
      "name": "sdOpSmoothSubtraction",
      "parameters": "float d1, float d2, float smoothness, bool cubic"
    },
    "dependencies": [
      "color/blend/smooth-max",
      "color/blend/smooth-max-cubic"
    ],
    "formerIds": [
      "SDF/operations/smooth-subtraction"
    ]
  },
  {
    "id": "shapes/operations/smooth-union",
    "name": "SDF Smooth Union",
    "family": "shapes",
    "mode": "fragment",
    "description": "Smoothly combines two signed distance fields using a controllable smoothing radius.",
    "signature": {
      "returnType": "float",
      "name": "sdOpSmoothUnion",
      "parameters": "float d1, float d2, float smoothness, bool cubic"
    },
    "dependencies": [
      "color/blend/smooth-min",
      "color/blend/smooth-min-cubic"
    ],
    "formerIds": [
      "SDF/operations/smooth-union"
    ]
  },
  {
    "id": "shapes/operations/subtraction",
    "name": "SDF Subtraction",
    "family": "shapes",
    "mode": "fragment",
    "description": "Subtracts the second signed distance field from the first.",
    "signature": {
      "returnType": "float",
      "name": "sdOpSubtraction",
      "parameters": "float d1, float d2"
    },
    "formerIds": [
      "SDF/operations/subtraction"
    ]
  },
  {
    "id": "shapes/operations/union",
    "name": "SDF Union",
    "family": "shapes",
    "mode": "fragment",
    "description": "Combines two signed distance fields using a union operation.",
    "signature": {
      "returnType": "float",
      "name": "sdOpUnion",
      "parameters": "float d1, float d2"
    },
    "formerIds": [
      "SDF/operations/union"
    ]
  },
  {
    "id": "shapes/rendering/draw-on",
    "name": "Draw On",
    "family": "shapes",
    "mode": "fragment",
    "description": "A shape that draws itself: its outline is traced by turning round the centre as progress goes from 0 to 1, then the shape fills as fill goes from 0 to 1. distance is the signed distance to the shape, in pixels, negative inside (the way the SDF snippets give it; for the sdf of Draw Text, which is positive inside, pass its opposite). lineWidth is the width of the outline in pixels, softness the soft end of the turn, in turns.",
    "signature": {
      "returnType": "float",
      "name": "drawOn",
      "parameters": "float distance, vec2 p, vec2 centre, float progress, float fill, float lineWidth, float softness"
    },
    "dependencies": [
      "shapes/rendering/stroke-mask",
      "shapes/rendering/fill-mask",
      "shapes/rendering/turn-reveal"
    ]
  },
  {
    "id": "shapes/rendering/fill-mask",
    "name": "SDF Fill Mask",
    "family": "shapes",
    "mode": "fragment",
    "description": "Converts a signed distance field into a filled shape mask with anti-aliased edges.",
    "signature": {
      "returnType": "float",
      "name": "sdFillMask",
      "parameters": "float distance, float antialias"
    },
    "dependencies": [
      "image-and-filters/post-processing/antialiased-step"
    ],
    "formerIds": [
      "SDF/rendering/fill-mask"
    ]
  },
  {
    "id": "shapes/rendering/glow-lines",
    "name": "Glow Lines",
    "family": "shapes",
    "mode": "fragment",
    "description": "Repeated neon lines around a distance: a soft glow that peaks where sin(distance x frequency + phase) crosses zero. frequency sets how many lines there are, phase moves them (animate it with the time), size the width of the glow, and power how sharp it is. Feed it the distance to a point, a shape or a folded space; add the result to a color to make it glow.",
    "signature": {
      "returnType": "float",
      "name": "glowLines",
      "parameters": "float d, float frequency, float phase, float size, float power"
    }
  },
  {
    "id": "shapes/rendering/rounding-margin-correction",
    "name": "Rounding Margin Correction",
    "family": "shapes",
    "mode": "fragment",
    "description": "Rounds off sharp edges of an SDF by shrinking the surface inward by a margin. Applied after evaluating the underlying SDF, not before.",
    "signature": {
      "returnType": "float",
      "name": "roundingMarginCorrection",
      "parameters": "float sdfResult, float margin"
    },
    "formerIds": [
      "SDF/corrections/rounding-margin-correction"
    ]
  },
  {
    "id": "shapes/rendering/scale-distance-correction",
    "name": "Scale Distance Correction",
    "family": "shapes",
    "mode": "fragment",
    "description": "Corrects an SDF distance after evaluating it on a scaled point. Must be multiplied back by the same factor used in the Scale transform to remain a valid signed distance.",
    "signature": {
      "returnType": "float",
      "name": "scaleDistanceCorrection",
      "parameters": "float sdfResult, float factor"
    },
    "formerIds": [
      "SDF/corrections/scale-distance-correction"
    ]
  },
  {
    "id": "shapes/rendering/sdf-distance-view",
    "name": "SDF Distance View",
    "family": "shapes",
    "mode": "fragment",
    "description": "Debug view of a signed distance field, in the style of Inigo Quilez: inside and outside colors, darkening near the edge (darkRange), iso-lines on both sides every period of distance (bandStrength 0 hides them), and a white zero line (edgeWidth). aa is the antialiasing width: Pixel Size in 2D, fwidth(d) in 3D.",
    "signature": {
      "returnType": "vec4",
      "name": "sdfDistanceView",
      "parameters": "float d, float aa, vec4 insideColor, vec4 outsideColor, float darkRange, float period, float bandStrength, float lineWidth, float edgeWidth"
    },
    "dependencies": [
      "shapes/rendering/fill-mask",
      "shapes/rendering/sdf-isolines",
      "shapes/rendering/stroke-mask"
    ]
  },
  {
    "id": "shapes/rendering/sdf-isolines",
    "name": "SDF Iso Lines",
    "family": "shapes",
    "mode": "fragment",
    "description": "Antialiased mask of repeating iso-lines around a signed distance field, drawn on both sides of the edge (inside and outside, using |d|), with optional fade-out with distance (fadeDist <= 0 disables the fade).",
    "signature": {
      "returnType": "float",
      "name": "sdIsoLines",
      "parameters": "float d, float period, float width, float aa, float fadeDist"
    }
  },
  {
    "id": "shapes/rendering/stroke-mask",
    "name": "SDF Stroke Mask",
    "family": "shapes",
    "mode": "fragment",
    "description": "Converts a signed distance field into an anti-aliased stroke mask.",
    "signature": {
      "returnType": "float",
      "name": "sdStrokeMask",
      "parameters": "float distance, float thickness, float antialias"
    },
    "formerIds": [
      "SDF/rendering/stroke-mask"
    ]
  },
  {
    "id": "shapes/rendering/tetrahedron-offset",
    "name": "SDF Tetrahedron Offset",
    "family": "shapes",
    "mode": "fragment",
    "description": "Computes the tetrahedron offset for a given index.",
    "signature": {
      "returnType": "vec3",
      "name": "tetrahedronOffset",
      "parameters": "float index"
    },
    "formerIds": [
      "SDF/normals/tetrahedron-offset"
    ]
  },
  {
    "id": "shapes/rendering/turn-angle",
    "name": "Turn Angle",
    "family": "shapes",
    "mode": "fragment",
    "description": "How far round a centre the point p is, from 0 to 1: 0 straight above the centre, 0.25 to its right, 0.5 below, 0.75 to its left. Turns clockwise.",
    "signature": {
      "returnType": "float",
      "name": "turnAngle",
      "parameters": "vec2 p, vec2 centre"
    }
  },
  {
    "id": "shapes/rendering/turn-reveal",
    "name": "Turn Reveal",
    "family": "shapes",
    "mode": "fragment",
    "description": "A mask that uncovers what lies round a centre as progress goes from 0 to 1: 1 where the point has been reached by the turn, 0 where it has not, with an edge softness wide (in turns). It starts straight above the centre and turns clockwise: a gauge, a radar, the tracing of an outline.",
    "signature": {
      "returnType": "float",
      "name": "turnReveal",
      "parameters": "vec2 p, vec2 centre, float progress, float softness"
    },
    "dependencies": [
      "shapes/rendering/turn-angle"
    ]
  },
  {
    "id": "space-and-camera/camera/camera-ray-from-basis",
    "name": "Camera Ray From Basis",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Ray direction for a pixel from a camera basis (see Look At Basis). uv is centered and aspect-corrected (y up), focal = 1.0 / tan(fov * 0.5): the larger it is, the more the camera zooms in.",
    "signature": {
      "returnType": "vec3",
      "name": "cameraRayFromBasis",
      "parameters": "vec2 uv, float focal, mat3 basis"
    },
    "formerIds": [
      "camera/basis/camera-ray-from-basis"
    ]
  },
  {
    "id": "space-and-camera/camera/look-at",
    "name": "Look At Basis",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Calculates the look-at basis matrix from origin, target, and roll.",
    "signature": {
      "returnType": "mat3",
      "name": "lookAtBasis",
      "parameters": "vec3 origin, vec3 target, float roll"
    },
    "formerIds": [
      "camera/basis/look-at",
      "orientation/look-at"
    ]
  },
  {
    "id": "space-and-camera/camera/ortho-ray",
    "name": "Orbit Orthographic Camera Ray",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Generates a ray from an orthographic camera: all rays share the same direction, and the origin slides across the image plane.",
    "signature": {
      "returnType": "vec3",
      "name": "orbitOrthoRay",
      "parameters": "vec2 uv, float distance, float elevation, float azimuth, vec3 target, float roll, float halfHeight, out vec3 direction"
    },
    "dependencies": [
      "space-and-camera/camera/look-at"
    ],
    "formerIds": [
      "camera/orbit/ortho-ray"
    ]
  },
  {
    "id": "space-and-camera/camera/perspective-ray",
    "name": "Orbit Perspective Camera Ray",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Generates a ray from a perspective camera orbiting a target: all rays share the same origin, and the direction varies across the image plane.",
    "signature": {
      "returnType": "vec3",
      "name": "orbitPerspectiveRay",
      "parameters": "vec2 uv, float distance, float elevation, float azimuth, vec3 target, float roll, float focalLength, out vec3 direction"
    },
    "dependencies": [
      "space-and-camera/camera/look-at"
    ],
    "formerIds": [
      "camera/orbit/perspective-ray"
    ]
  },
  {
    "id": "space-and-camera/coordinates/aspect-uv",
    "name": "Aspect UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Corrects the aspect ratio of coordinates so that shapes keep their proportions across different render sizes. Does not move the origin.",
    "signature": {
      "returnType": "vec2",
      "name": "aspectUV",
      "parameters": "vec2 uv, vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/aspect-uv"
    ]
  },
  {
    "id": "space-and-camera/coordinates/box-center",
    "name": "Box Center",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "The middle of an axis aligned box given by its bottom left corner (boxMin) and its top right corner (boxMax).",
    "signature": {
      "returnType": "vec2",
      "name": "boxCenter",
      "parameters": "vec2 boxMin, vec2 boxMax"
    }
  },
  {
    "id": "space-and-camera/coordinates/box-coordinates",
    "name": "Box Coordinates",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Where a point is in an axis aligned box: (0, 0) at its bottom left corner (boxMin), (1, 1) at its top right (boxMax), below 0 or above 1 outside it. Use it to run an effect across a box (a title, a sprite, a bounding box), whatever its size.",
    "signature": {
      "returnType": "vec2",
      "name": "boxCoordinates",
      "parameters": "vec2 p, vec2 boxMin, vec2 boxMax"
    }
  },
  {
    "id": "space-and-camera/coordinates/box-size",
    "name": "Box Size",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "The width and the height of an axis aligned box given by its bottom left corner (boxMin) and its top right corner (boxMax).",
    "signature": {
      "returnType": "vec2",
      "name": "boxSize",
      "parameters": "vec2 boxMin, vec2 boxMax"
    }
  },
  {
    "id": "space-and-camera/coordinates/centered-aspect-uv",
    "name": "Centered Aspect UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Transforms normalized coordinates into a centered coordinate system while preserving proportions across different render sizes.",
    "signature": {
      "returnType": "vec2",
      "name": "centeredAspectUV",
      "parameters": "vec2 uv, vec2 viewportSize"
    },
    "dependencies": [
      "space-and-camera/coordinates/aspect-uv"
    ],
    "formerIds": [
      "coordinates/centered-aspect-uv"
    ]
  },
  {
    "id": "space-and-camera/coordinates/fit-box",
    "name": "Fit Box Scale",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "The factor a box must be scaled by to fill a fraction (fill, 0 to 1) of the viewport without changing its aspect ratio, in the space where the viewport is 1 high (see Centered Aspect UV). With a fill of 1 the box is as wide or as high as the viewport, whichever comes first.",
    "signature": {
      "returnType": "float",
      "name": "fitBoxScale",
      "parameters": "vec2 boxMin, vec2 boxMax, vec2 viewportSize, float fill"
    }
  },
  {
    "id": "space-and-camera/coordinates/fit-contain",
    "name": "Fit Contain UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Maps image coordinates to fit an image entirely inside the viewport while preserving aspect ratio, similar to CSS object-fit contain.",
    "signature": {
      "returnType": "vec2",
      "name": "fitContainUV",
      "parameters": "vec2 uv, vec2 imageSize, vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/fit-contain"
    ]
  },
  {
    "id": "space-and-camera/coordinates/fit-cover",
    "name": "Fit Cover UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Maps image coordinates to fill the viewport while preserving aspect ratio, cropping excess areas similar to CSS object-fit cover.",
    "signature": {
      "returnType": "vec2",
      "name": "fitCoverUV",
      "parameters": "vec2 uv, vec2 imageSize, vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/fit-cover"
    ]
  },
  {
    "id": "space-and-camera/coordinates/fit-fill",
    "name": "Fit Fill UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Maps viewport pixels to image coordinates one to one, from the bottom left corner: the image keeps its own pixel size, is not centered, and fills the viewport only when it is as large as the viewport.",
    "signature": {
      "returnType": "vec2",
      "name": "fitFillUV",
      "parameters": "vec2 uv, vec2 imageSize, vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/fit-fill"
    ]
  },
  {
    "id": "space-and-camera/coordinates/fit-none",
    "name": "Fit None UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Maps image coordinates without scaling, preserving the original image pixel size similar to CSS object-fit none.",
    "signature": {
      "returnType": "vec2",
      "name": "fitNoneUV",
      "parameters": "vec2 uv, vec2 imageSize, vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/fit-none"
    ]
  },
  {
    "id": "space-and-camera/coordinates/mirror-repeat",
    "name": "Mirror Repeat UV",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Folds a coordinate back into 0..1 by mirroring it at every edge, so an image read past its borders is reflected instead of clamped or repeated.",
    "signature": {
      "returnType": "vec2",
      "name": "mirrorRepeatUV",
      "parameters": "vec2 uv"
    },
    "formerIds": [
      "coordinates/mirror-repeat"
    ]
  },
  {
    "id": "space-and-camera/coordinates/pixel-size",
    "name": "Pixel Size",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Returns the size of a pixel in screen space based on the viewport size. Useful for anti-aliasing and other screen-space calculations.",
    "signature": {
      "returnType": "float",
      "name": "pixelSize",
      "parameters": "vec2 viewportSize"
    },
    "formerIds": [
      "coordinates/pixel-size"
    ]
  },
  {
    "id": "space-and-camera/coordinates/spherical-position",
    "name": "Spherical Position",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Calculates the 3D position from spherical coordinates (distance, angleX, angleY).",
    "signature": {
      "returnType": "vec3",
      "name": "sphericalPosition",
      "parameters": "float dist, float angleX, float angleY"
    },
    "formerIds": [
      "coordinates/spherical-position"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/cell-id",
    "name": "Cell ID 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Returns the integer index of the cell that contains a point, for a grid of cells centered on the multiples of the period. Matches the cells of Repeat 2D: (0, 0) is the cell at the origin.",
    "signature": {
      "returnType": "vec2",
      "name": "cellID2D",
      "parameters": "vec2 p, vec2 period"
    },
    "formerIds": [
      "transform/2D/cell-id"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/elongate",
    "name": "Elongate 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Stretches a shape along each axis by a given half-length, keeping its end caps intact.",
    "signature": {
      "returnType": "vec2",
      "name": "elongate2D",
      "parameters": "vec2 p, vec2 h"
    },
    "formerIds": [
      "transform/2D/elongate"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/fit-box-transform",
    "name": "Fit Box Transform",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "What it takes to put a box in front of the viewport: its middle at anchor, as big as the viewport allows (fill, 0 to 1, of its room), its aspect ratio kept. Returns the translate and gives the scale: with Translate 2D and Scale 2D, in this order, a point of the screen (centered uv, see Centered Aspect UV) becomes a point of the space of the box.",
    "signature": {
      "returnType": "vec2",
      "name": "fitBoxTransform",
      "parameters": "vec2 boxMin, vec2 boxMax, vec2 viewportSize, float fill, vec2 anchor, out float scale"
    },
    "dependencies": [
      "space-and-camera/coordinates/fit-box",
      "space-and-camera/coordinates/box-center"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/mirror",
    "name": "Mirror 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Mirrors a 2D point across the line through the origin that is perpendicular to a normal. Points on the side the normal points to are kept, the others are reflected onto it.",
    "signature": {
      "returnType": "vec2",
      "name": "mirror2D",
      "parameters": "vec2 p, vec2 normal"
    },
    "formerIds": [
      "transform/2D/mirror"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/repeat",
    "name": "Repeat 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Repeats the domain infinitely with a given period, so a shape is tiled across the whole image.",
    "signature": {
      "returnType": "vec2",
      "name": "repeat2D",
      "parameters": "vec2 p, vec2 period"
    },
    "formerIds": [
      "transform/2D/repeat"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/repeat-limited",
    "name": "Repeat Limited 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Repeats the domain a limited number of times on each side of the origin, so a shape is tiled in a finite grid.",
    "signature": {
      "returnType": "vec2",
      "name": "repeatLimited2D",
      "parameters": "vec2 p, vec2 period, vec2 limit"
    },
    "formerIds": [
      "transform/2D/repeat-limited"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/rotate",
    "name": "Rotate 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Rotates a 2D point around the origin by an angle in radians, effectively rotating the shape counter-clockwise.",
    "signature": {
      "returnType": "vec2",
      "name": "rotate2D",
      "parameters": "vec2 p, float angle"
    },
    "formerIds": [
      "transform/2D/rotate"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/s-bend",
    "name": "S Bend (2D)",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Bends the space sideways between two heights: the x of each point is moved by a sine of its y, a half wave (amplitude) plus a full wave (overtone). With both, a straight shape becomes an S; with the overtone alone, it is bent one way then the other, with amplitude alone, it arcs. Outside the range the bend stays at its end value. Apply it to the point before a shape's distance, like the other transforms; it is a little more than 1-Lipschitz, so the distance is slightly under the real one (scale it by 0.8 if you march it).",
    "signature": {
      "returnType": "vec2",
      "name": "sBend2D",
      "parameters": "vec2 p, float amplitude, float overtone, float yMin, float yMax"
    }
  },
  {
    "id": "space-and-camera/transform-2d/scale",
    "name": "Scale 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Scales the domain of a shape uniformly. For a signed distance, multiply the resulting distance by the same factor to keep it exact.",
    "signature": {
      "returnType": "vec2",
      "name": "scale2D",
      "parameters": "vec2 p, float factor"
    },
    "formerIds": [
      "transform/2D/scale"
    ]
  },
  {
    "id": "space-and-camera/transform-2d/tile",
    "name": "Tile",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "The local coordinates of a point in a grid of square cells, and the cell it is in. scale is the number of cells per unit: with 4, the space is cut into cells a quarter wide. The coordinates go from -0.5 to 0.5 in each cell, centered on it, whatever the scale: fold a space again and again with it to make a fractal. cell is the whole number of the cell, one for x and one for y.",
    "signature": {
      "returnType": "vec2",
      "name": "tile2D",
      "parameters": "vec2 p, float scale, out vec2 cell"
    }
  },
  {
    "id": "space-and-camera/transform-2d/translate",
    "name": "Translate 2D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Translates a 2D point by an offset, effectively moving the shape's domain.",
    "signature": {
      "returnType": "vec2",
      "name": "translate2D",
      "parameters": "vec2 p, vec2 offset"
    },
    "formerIds": [
      "transform/2D/translate"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/bend",
    "name": "Bend 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Bends space along the X axis by an amount proportional to position.",
    "signature": {
      "returnType": "vec3",
      "name": "bend",
      "parameters": "vec3 p, float amount"
    },
    "formerIds": [
      "transform/3D/bend",
      "transform/bend"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/cell-id",
    "name": "Cell ID 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Returns the integer index of the cell that contains a point, for a grid of cells centered on the multiples of the period. Matches the cells of Repeat 3D: (0, 0, 0) is the cell at the origin.",
    "signature": {
      "returnType": "vec3",
      "name": "cellID3D",
      "parameters": "vec3 p, vec3 period"
    },
    "formerIds": [
      "transform/3D/cell-id"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/elongate",
    "name": "Elongate 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Elongates a shape's domain along each axis by clamping the point before evaluating the SDF. halfStretch represents the half-length of elongation on each side.",
    "signature": {
      "returnType": "vec3",
      "name": "elongate",
      "parameters": "vec3 p, vec3 halfStretch"
    },
    "formerIds": [
      "transform/3D/elongate",
      "transform/elongate"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/mirror",
    "name": "Mirror 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Mirrors space by taking the absolute value along the selected axes.",
    "signature": {
      "returnType": "vec3",
      "name": "mirror",
      "parameters": "vec3 p, vec3 axis"
    },
    "formerIds": [
      "transform/3D/mirror",
      "transform/mirror"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/repeat",
    "name": "Repeat 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Repeats space infinitely along each axis with the given period.",
    "signature": {
      "returnType": "vec3",
      "name": "repeat",
      "parameters": "vec3 p, vec3 period"
    },
    "formerIds": [
      "transform/3D/repeat",
      "transform/repeat"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/repeat-count",
    "name": "Repeat Count 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Repeats space on a regular grid centered on the origin, with the number of copies you give along each axis: 4 along x and 2 along z make a grid of 8 copies. The count can be even or odd, and 1 along an axis does not repeat it. spacing is the distance between the centers of two neighbours, the same on the three axes. It gives the point as seen from the nearest copy, so a shape measured at that point is drawn once for each copy. Repeat Limited 3D does the same with an odd number of copies only (2n + 1 along an axis).",
    "signature": {
      "returnType": "vec3",
      "name": "repeatCount",
      "parameters": "vec3 p, float spacing, vec3 count"
    }
  },
  {
    "id": "space-and-camera/transform-3d/repeat-limited",
    "name": "Repeat Limited 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Repeats space along each axis with the given spacing, up to a maximum count.",
    "signature": {
      "returnType": "vec3",
      "name": "repeatLimited",
      "parameters": "vec3 p, float spacing, vec3 count"
    },
    "formerIds": [
      "transform/3D/repeat-limited",
      "transform/repeat-limited"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/rotate-axis",
    "name": "Rotate Axis 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Rotates a point around an arbitrary normalized axis by the given angle in radians (Rodrigues' rotation formula).",
    "signature": {
      "returnType": "vec3",
      "name": "rotateAxis",
      "parameters": "vec3 p, vec3 axis, float angle"
    },
    "formerIds": [
      "transform/3D/rotate-axis",
      "transform/rotate-axis"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/rotate-x",
    "name": "Rotate X 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Rotates a point around the X axis by the given angle in radians.",
    "signature": {
      "returnType": "vec3",
      "name": "rotateX",
      "parameters": "vec3 p, float angle"
    },
    "formerIds": [
      "transform/3D/rotate-x",
      "transform/rotate-x"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/rotate-y",
    "name": "Rotate Y 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Rotates a point around the Y axis by the given angle in radians.",
    "signature": {
      "returnType": "vec3",
      "name": "rotateY",
      "parameters": "vec3 p, float angle"
    },
    "formerIds": [
      "transform/3D/rotate-y",
      "transform/rotate-y"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/rotate-z",
    "name": "Rotate Z 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Rotates a point around the Z axis by the given angle in radians.",
    "signature": {
      "returnType": "vec3",
      "name": "rotateZ",
      "parameters": "vec3 p, float angle"
    },
    "formerIds": [
      "transform/3D/rotate-z",
      "transform/rotate-z"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/scale",
    "name": "Scale 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Scales a point by a uniform factor. Note: the returned distance from an SDF evaluated on this point must be multiplied back by the same factor to remain a correct signed distance.",
    "signature": {
      "returnType": "vec3",
      "name": "scale",
      "parameters": "vec3 p, float factor"
    },
    "formerIds": [
      "transform/3D/scale",
      "transform/scale"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/translate",
    "name": "Translate 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Translates a point by an offset, effectively moving the shape's domain.",
    "signature": {
      "returnType": "vec3",
      "name": "translate",
      "parameters": "vec3 p, vec3 offset"
    },
    "formerIds": [
      "transform/3D/translate",
      "transform/translate"
    ]
  },
  {
    "id": "space-and-camera/transform-3d/twist",
    "name": "Twist 3D",
    "family": "space-and-camera",
    "mode": "fragment",
    "description": "Twists space around the Y axis by an amount proportional to height.",
    "signature": {
      "returnType": "vec3",
      "name": "twist",
      "parameters": "vec3 p, float amount"
    },
    "formerIds": [
      "transform/3D/twist",
      "transform/twist"
    ]
  },
  {
    "id": "text-and-sprites/font/font-advance",
    "name": "Font Advance",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How far the pen moves after the character `code`, in em: multiply by the size in pixels. 0 for a character that is not in the image.",
    "signature": {
      "returnType": "float",
      "name": "fontAdvance",
      "parameters": "sampler2D font, int code"
    },
    "dependencies": [
      "text-and-sprites/font/font-data",
      "text-and-sprites/font/font-page"
    ]
  },
  {
    "id": "text-and-sprites/font/font-char",
    "name": "Font Char",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How much of a pixel the character `code` of a font image covers, from 0 to 1. `p` is in pixels from the origin of the character (the left end of its baseline), `y` upwards; `size` is the size of the em in pixels.",
    "signature": {
      "returnType": "float",
      "name": "fontChar",
      "parameters": "sampler2D font, int code, vec2 p, float size"
    },
    "dependencies": [
      "text-and-sprites/font/font-char-distance"
    ]
  },
  {
    "id": "text-and-sprites/font/font-char-distance",
    "name": "Font Char Distance",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The signed distance in pixels (above 0 inside) to the character `code` of a font image, for the pixel at `p`: `p` is in pixels from the origin of the character (the left end of its baseline), `y` upwards, and `size` is the size of the em in pixels. Use it for outlines, shadows and glows.",
    "signature": {
      "returnType": "float",
      "name": "fontCharDistance",
      "parameters": "sampler2D font, int code, vec2 p, float size"
    },
    "dependencies": [
      "text-and-sprites/font/font-data",
      "text-and-sprites/font/font-flipped",
      "text-and-sprites/font/font-page"
    ]
  },
  {
    "id": "text-and-sprites/font/font-data",
    "name": "Font Data",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "A value in em (-4 to 4) of a data band of a font image: the advance, the origin of a glyph, the header.",
    "signature": {
      "returnType": "float",
      "name": "fontData",
      "parameters": "sampler2D font, float band, float row"
    },
    "dependencies": [
      "text-and-sprites/font/font-word"
    ]
  },
  {
    "id": "text-and-sprites/font/font-flipped",
    "name": "Font Flipped",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "Whether a software gives a font image upside down to a shader that reads it with texture2D (VDMX does). It finds it out from the header of the image, so the font snippets read the same image the same way in every software. False for an image it cannot tell.",
    "signature": {
      "returnType": "bool",
      "name": "fontFlipped",
      "parameters": "sampler2D font"
    }
  },
  {
    "id": "text-and-sprites/font/font-line-height",
    "name": "Font Line Height",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The distance between two lines of a font image, in em.",
    "signature": {
      "returnType": "float",
      "name": "fontLineHeight",
      "parameters": "sampler2D font"
    },
    "dependencies": [
      "text-and-sprites/font/font-data"
    ]
  },
  {
    "id": "text-and-sprites/font/font-page",
    "name": "Font Page",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The first code of a font image divided by 256: 0 for the codes 0 to 255, 4 for the codes 1024 to 1279.",
    "signature": {
      "returnType": "float",
      "name": "fontPage",
      "parameters": "sampler2D font"
    },
    "dependencies": [
      "text-and-sprites/font/font-word"
    ]
  },
  {
    "id": "text-and-sprites/font/font-text",
    "name": "Font Text",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How much of a pixel a text held in an image covers, from 0 to 1. `p` is in pixels from the start of the first line, `y` upwards; `size` is the size of the em in pixels. The text image holds up to 256 characters.",
    "signature": {
      "returnType": "float",
      "name": "fontText",
      "parameters": "sampler2D font, sampler2D text, vec2 p, float size"
    },
    "dependencies": [
      "text-and-sprites/font/font-text-distance"
    ]
  },
  {
    "id": "text-and-sprites/font/font-text-distance",
    "name": "Font Text Distance",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The signed distance in pixels (above 0 inside) to a text held in an image (made by the Font Image tool), for the pixel at `p` in pixels from the start of the first line, `y` upwards. The text image holds up to 256 characters; a line break goes to the next line.",
    "signature": {
      "returnType": "float",
      "name": "fontTextDistance",
      "parameters": "sampler2D font, sampler2D text, vec2 p, float size"
    },
    "dependencies": [
      "text-and-sprites/font/font-flipped",
      "text-and-sprites/font/font-char-distance",
      "text-and-sprites/font/font-advance",
      "text-and-sprites/font/font-line-height"
    ]
  },
  {
    "id": "text-and-sprites/font/font-text-length",
    "name": "Font Text Length",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How many characters a text held in an image has: the number of its characters before the first empty one. A line break counts as one, as it does for Font Text Typed. The text image holds up to 256 characters.",
    "signature": {
      "returnType": "float",
      "name": "fontTextLength",
      "parameters": "sampler2D text"
    }
  },
  {
    "id": "text-and-sprites/font/font-text-typed",
    "name": "Font Text Typed",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "Whether the pixel at p lies in the first shown characters of a text held in an image: 1 where the text is written, 0 elsewhere, with an edge one pixel wide at the pen. p is in pixels from the start of the first line, y upwards; size is the size of the em in pixels. The lines before the one being written are all there; a line break counts as a character. Use it to mask what Font Text draws, and make shown grow with the time for a typewriter.",
    "signature": {
      "returnType": "float",
      "name": "fontTextTyped",
      "parameters": "sampler2D font, sampler2D text, vec2 p, float size, float shown"
    },
    "dependencies": [
      "text-and-sprites/font/font-flipped",
      "text-and-sprites/font/font-advance",
      "text-and-sprites/font/font-line-height",
      "text-and-sprites/font/font-data"
    ]
  },
  {
    "id": "text-and-sprites/font/font-word",
    "name": "Font Word",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "A 16-bit number of a data band of a font image (made by the Font Image tool), 0 to 65535. `band` is the place across the image, `row` the row of cells counted from the top.",
    "signature": {
      "returnType": "float",
      "name": "fontWord",
      "parameters": "sampler2D font, float band, float row"
    },
    "dependencies": [
      "text-and-sprites/font/font-flipped"
    ]
  },
  {
    "id": "text-and-sprites/msdf/msdf-coverage",
    "name": "MSDF Coverage",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How much of a pixel a multi-channel distance field covers, from 0 to 1, with an edge one pixel wide. `rangePx` is the range of the field on screen, in pixels.",
    "signature": {
      "returnType": "float",
      "name": "msdfCoverage",
      "parameters": "vec4 texel, float rangePx"
    },
    "dependencies": [
      "text-and-sprites/msdf/msdf-distance"
    ]
  },
  {
    "id": "text-and-sprites/msdf/msdf-distance",
    "name": "MSDF Distance",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The signed distance to the edge, in pixels (above 0 inside), from a texel of a multi-channel distance field. `rangePx` is how many pixels the range of the field is on screen: the range of the field in em times the size of the em in pixels.",
    "signature": {
      "returnType": "float",
      "name": "msdfDistance",
      "parameters": "vec4 texel, float rangePx"
    },
    "dependencies": [
      "text-and-sprites/msdf/msdf-median"
    ]
  },
  {
    "id": "text-and-sprites/msdf/msdf-median",
    "name": "MSDF Median",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "The median of the three channels of a multi-channel signed distance field: 0.5 on the edge, above inside, below outside.",
    "signature": {
      "returnType": "float",
      "name": "msdfMedian",
      "parameters": "vec3 msdf"
    }
  },
  {
    "id": "text-and-sprites/sprites/sprite-cell",
    "name": "Sprite Cell",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "Reads a cell of a sprite sheet: an image cut into a regular grid. The cells count from the top left, row by row; `uv` is the place inside the cell, from its bottom left (0, 0) to its top right (1, 1).",
    "signature": {
      "returnType": "vec4",
      "name": "spriteCell",
      "parameters": "sampler2D sheet, vec2 grid, float index, vec2 uv"
    }
  },
  {
    "id": "text-and-sprites/typewriter/soft-wipe",
    "name": "Soft Wipe",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "A mask that uncovers what is behind an edge moving along a width: 1 where x is behind the edge, 0 where it is ahead, with a soft edge softness wide. At progress 0 nothing shows, at 1 everything from 0 to width does.",
    "signature": {
      "returnType": "float",
      "name": "softWipe",
      "parameters": "float x, float progress, float width, float softness"
    }
  },
  {
    "id": "text-and-sprites/typewriter/typewriter-count",
    "name": "Typewriter Count",
    "family": "text-and-sprites",
    "mode": "fragment",
    "description": "How many characters a typewriter has typed after time seconds, at speed characters a second: it goes from 0 to length, stays there for hold seconds, then starts again. Whole characters: feed it to Font Text Typed.",
    "signature": {
      "returnType": "float",
      "name": "typewriterCount",
      "parameters": "float time, float speed, float hold, float length"
    }
  }
]
