Join our Discord Community

React Worley Noise Shaders

React Worley noise with cellular patterns. Procedural cellular textures for Next.js with TypeScript and shadcn/ui—free code.

Building cellular pattern effects?

Join our Discord community for help from other developers working with Worley noise and procedural patterns.


Need sophisticated cellular pattern effects with authentic Worley noise? Most developers use simple geometric patterns that can't capture the organic complexity of cellular structures. This React Worley noise component uses GPU distance field algorithms to create authentic cellular patterns with customizable animation and coloring.

Copy-paste TypeScript component that creates mesmerizing Worley noise effects with cellular distance calculations, hash-based random point generation, and smooth animation. Professional procedural noise with customizable parameters. Built for Next.js applications with shadcn/ui design system. GPU-accelerated—smooth cellular patterns.

React Worley noise with cellular mathematics

Procedural cellular patterns with distance fields and animated point distribution:

Loading component...

Based on shader by 4l2GzW - Worley Noise implementation

Perfect for React 19, Next.js 15, and modern TypeScript projects. Worley patterns generated entirely on GPU using distance field algorithms and hash functions. Customizable speed, scale, brightness, contrast, and color variation. Full shadcn/ui compatibility with Tailwind CSS styling.

Installation

npx shadcn@latest add https://www.shadcn.io/registry/worley-noise-shaders.json
npx shadcn@latest add https://www.shadcn.io/registry/worley-noise-shaders.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/worley-noise-shaders.json
bunx shadcn@latest add https://www.shadcn.io/registry/worley-noise-shaders.json

Usage

import { WorleyNoiseShaders } from "@/components/ui/worley-noise-shaders";

export default function CellularPatterns() {
  return (
    <WorleyNoiseShaders
      speed={0.1}
      scale={1.0}
      brightness={1.0}
      contrast={1.0}
      colorShift={0.3}
    >
      <div className="relative z-10">
        <h1>Content over cellular patterns</h1>
      </div>
    </WorleyNoiseShaders>
  );
}

Why Worley noise requires mathematical precision

Simple geometric patterns lack the organic randomness of natural cellular structures. Static cellular textures can't capture the dynamic evolution of living systems. Most libraries struggle with the distance field calculations needed for authentic Worley noise. Traditional approaches can't handle the hash functions required for proper random point distribution.

GPU distance field mathematics solve this with authentic Worley noise algorithms. Hash functions generate truly random point distributions. Distance field calculations create natural cellular boundaries. Matrix transformations provide efficient hash generation. Minimum distance operations ensure proper cellular structure.

This React Worley noise component uses professional procedural generation techniques. Distance fields create authentic cellular patterns. Hash functions ensure random point distribution. Animation flows smoothly through cellular evolution. Color variations enhance visual complexity.

React Worley noise shader features

  • Authentic Worley algorithm - True cellular noise using distance field calculations
  • Hash-based randomization - Professional random point generation using matrix transformations
  • Distance field optimization - Efficient cellular boundary calculation with GPU parallelization
  • Cellular animation - Smooth evolution of cellular patterns over time
  • Scale transformation - Zoom in/out while maintaining cellular structure integrity
  • Brightness control - Overall intensity adjustment for different lighting environments
  • Contrast enhancement - Power function adjustment for pattern definition
  • Color variation - Procedural color generation with sine/cosine modulation
  • Speed animation - Customizable timing for cellular pattern evolution
  • 9-cell neighborhood - Complete Worley noise implementation with proper boundary handling
  • Minimum distance calculation - Authentic cellular structure using mathematical optimization
  • TypeScript React component - Full IDE support with prop definitions
  • Next.js compatible - Works with App Router and modern React patterns
  • shadcn/ui integration - Consistent with Tailwind CSS design systems
  • Copy-paste installation - No vendor lock-in, you own the shader code

API Reference

WorleyNoiseShaders

Main container component for the Worley noise cellular pattern effect.

PropTypeDefaultDescription
speednumber0.1Animation speed for cellular evolution (0.0 to 1.0)
scalenumber1.0Pattern scale and cellular density (0.3 to 3.0)
brightnessnumber1.0Overall pattern brightness (0.5 to 2.0)
contrastnumber1.0Pattern contrast and definition (0.5 to 3.0)
colorShiftnumber0.0Color variation intensity (0.0 to 1.0)
classNamestring-Additional Tailwind CSS classes
...propsHTMLAttributes<HTMLDivElement>-All standard div props

GPU Worley noise troubleshooting

Animation too slow/fast: Adjust speed for comfortable cellular evolution. Worley noise typically works best with slower animations to appreciate the cellular structure.

Cells too small/large: Use scale to control cellular density. Higher values create finer cellular patterns, lower values create larger cellular structures.

Pattern too dim/bright: Modify brightness for overall pattern intensity. Cellular patterns can be subtle - adjust for optimal visibility against content.

Cells too soft/sharp: Adjust contrast to control pattern definition. Higher contrast creates sharper cellular boundaries, lower contrast creates softer transitions.

Grayscale vs color: Use colorShift to add color variation. Zero creates pure grayscale Worley noise, higher values add procedural color patterns.

Mobile performance: Worley noise requires intensive distance calculations. Consider reducing scale or using static speed values on older mobile devices.

Cellular authenticity: The 9-cell neighborhood ensures authentic Worley noise that matches the mathematical definition and produces proper cellular structures.

More React shader components

Explore other GPU-accelerated shader components for Next.js applications:

React Worley noise FAQ