Join our Discord Community

Synthwave Canyon Shaders

Retro synthwave landscape with neon colors and procedural terrain. Plane marching algorithm creating nostalgic 80s canyon flythrough with dynamic sun effects.

Powered by

Building retro synthwave effects?

Join our Discord community for help from other developers working with procedural terrain and retro aesthetics.


Look, we've all tried to build synthwave landscapes. You either end up with basic CSS gradients that look nothing like proper 80s aesthetics or JavaScript calculations that can't handle complex terrain generation smoothly. This React component uses advanced plane marching with procedural terrain that actually runs at 60fps without melting your CPU.

Nostalgic synthwave canyon flythrough

Authentic 80s retro landscape with neon colors, procedural terrain, and dynamic sun effects:

Loading component...

Created by mrange in 2021-12-08

Built for React applications with TypeScript and Next.js in mind. The animation runs entirely on the GPU using WebGL plane marching with fractal brownian motion terrain and HSV color space calculations. Works seamlessly with shadcn/ui design systems.

Installation

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

Usage

import { SynthwaveCanyonShaders } from "@/components/ui/synthwave-canyon-shaders";

export default function Hero() {
  return (
    <SynthwaveCanyonShaders>
      <div className="relative z-10">
        <h1>Your content here</h1>
      </div>
    </SynthwaveCanyonShaders>
  );
}

Why most synthwave implementations suck

Most developers try to create synthwave effects with CSS linear-gradients or Canvas API drawing. Bad idea. You're dealing with expensive DOM gradients, limited terrain generation, and wondering why your React app feels sluggish. Some use Three.js with mesh terrain, which sounds smart until you realize you're computing vertex positions for every terrain point on every frame.

This React component uses mathematical plane marching with GPU-accelerated fractal noise generation. The GPU handles everything using optimized terrain algorithms with authentic synthwave mathematics. No JavaScript calculations, no DOM rendering, just smooth 60fps retro art.

Features

  • Zero JavaScript animation overhead - Pure WebGL plane marching runs on GPU
  • Fractal brownian motion for realistic procedural terrain generation
  • HSV color space calculations creating authentic synthwave neon gradients
  • Dynamic sun rendering with corona effects and atmospheric glow
  • TypeScript definitions for proper IDE support in React projects
  • Customizable parameters with 4 props for complete control
  • Performance optimization through efficient GPU terrain algorithms
  • shadcn/ui compatible for consistent design systems
  • Responsive design with automatic canvas resizing

API Reference

SynthwaveCanyonShaders

Main container component for the synthwave canyon effect.

PropTypeDefaultDescription
speednumber1.0Flight speed through canyon (0.1 to 3.0)
flightHeightnumber1.0Camera height above terrain (0.1 to 3.0)
crtEffectbooleanfalseEnable retro CRT scanline effect
terrainDepthnumber24.0Terrain rendering distance (5.0 to 50.0)
classNamestring-Additional Tailwind CSS classes
...propsHTMLAttributes<HTMLDivElement>-All standard div props

Common gotchas

Animation not working: WebGL might not be supported in the browser. The component logs warnings when WebGL initialization fails. Check browser compatibility.

Performance issues on mobile: Some older phones struggle with complex terrain calculations. Consider reducing terrainDepth and disabling crtEffect for better performance.

Flight too fast: Lower the speed prop for more controlled canyon navigation. Values around 0.3-0.5 work well for contemplative synthwave movement.

Terrain too close: Increase the flightHeight prop to fly higher above the canyon floor. Values around 2.0-3.0 create more dramatic aerial views.

Terrain too short: Increase the terrainDepth prop for longer, more immersive canyon sequences. Higher values create deeper perspective effects.

You might also like

Explore other shader-based background components for React applications:

Questions developers actually ask