shaderbase-recipes
ShaderBase Recipes
Recipes are copy-paste-ready integration files that let users add a ShaderBase shader to their project. Each shader has a recipes/three.ts and/or recipes/r3f.tsx.
Three.js Recipe Pattern
A factory function that creates a ShaderMaterial with inlined GLSL.
import { Color, ShaderMaterial } from "three";
type MyShaderOptions = {
color?: string;
intensity?: number;
};
const vertexShader = `
varying vec2 vUv;
More from devallibus/shaderbase-skills
glsl-sdf
GLSL signed distance fields — 2D/3D primitives, boolean operations, ray marching. Use when creating geometric shapes, text effects, procedural geometry, or ray-marched scenes.
1glsl-color
GLSL color space operations — HSV, cosine palettes, tonemapping, OKLab, sRGB. Use when working with color manipulation, gradients, palettes, or HDR rendering.
1glsl-noise
GLSL noise functions — hash, value, simplex, FBM, Voronoi, Worley. Use when generating procedural textures, terrain, organic patterns, or animated effects.
1glsl-math
GLSL math utilities — remap, smoothstep, easing, smoothmin, complex numbers, anti-aliasing helpers, constants. Use for interpolation, animation curves, or mathematical operations in shaders.
1glsl-coordinates
GLSL space transformations — rotation, polar/spherical, tiling, domain repetition. Use when manipulating coordinate spaces, creating patterns, or transforming geometry.
1shaderbase-manifest
Writing shader.json manifests for the ShaderBase registry — schema reference, capability profiles, uniforms, provenance tracking. Use when creating or editing ShaderBase shader packages.
1