procedural-mathematics-expert

Generates procedural GLSL ES 3.0 shader mathematics using distance fields, noise, and domain warping.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/Ohmnia/site-build --skill procedural-mathematics-expert-ohmnia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: procedural-mathematics-expert
Source: https://github.com/Ohmnia/site-build/tree/main/.opencode/skills/procedural-mathematics-expert
Command: npx skills add https://github.com/Ohmnia/site-build --skill procedural-mathematics-expert-ohmnia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing procedural GPU shaders requires deep mathematical expertise in signed distance fields, fractals, noise functions, and coordinate transformations, which most developers lack when building raymarched or fully procedural scenes. ## Core Features & Use Cases - SDF and CSG Construction: Builds geometry from signed distance primitives combined with smooth union, intersection, and difference operators for raymarching. - Procedural Pattern Generation: Implements FBM, Voronoi, curl noise, domain warping, space folding, and fractal systems like Mandelbulb and KIFS. - Numerical Stability Guidance: Applies safe normalization, epsilon offsets, clamping, and precision discipline so shaders run indefinitely without artifacts. - Use Case: Ask for a raymarched alien coral reef scene, and receive GLSL combining gyroid SDFs, Voronoi cell detail, curl-warped domains, and smooth CSG blending with stable iteration bounds. ## Quick Start Write a GLSL ES 3.0 raymarching shader that renders an animated fractal landscape using domain warping and smooth SDF blending.

Frequently Asked Questions about procedural-mathematics-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a raymarching shader with signed distance fields in GLSL?

Define SDF primitive functions like sdSphere and sdBox that return the shortest distance to a surface, combine them with smooth CSG operators, then march rays by stepping the returned distance each iteration. Bound iterations and use epsilon offsets for stable convergence.

What is domain warping in procedural shader generation?

Domain warping distorts input coordinates with noise or flow fields before evaluating geometry, using methods like FBM warp, curl warp, or recursive warp. It makes procedural scenes appear fluid and organic rather than static.

Can procedural shaders replace meshes and textures in Three.js?

Yes, geometry, lighting, fog, and materials can be computed entirely in fragment shaders, with Three.js only compiling shaders, uploading uniforms, and presenting framebuffers. This suits raymarched and fractal scenes but not asset-heavy pipelines.

Why does my shader produce artifacts after running for a long time?

Long-running shaders degrade from floating-point drift, division by zero, and exploding recursion. Guard normalize, length, and division operations, clamp values, use epsilon offsets, and prefer highp precision for raymarching.

When should I use Voronoi versus FBM noise in shaders?

Use Voronoi for cellular structures like crystals, coral, rock, and biological patterns. Use FBM for continuous phenomena like terrain, clouds, and atmospheric density, keeping octave counts minimal to control GPU cost.