Dither Prism Hero
componentry/dither-prism-heroFreeComponent
A stunning WebGL hero background featuring advanced dithering patterns, prismatic color refraction, holographic iridescence, and center-focused ripple energy.
Live preview
live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://componentry.dev/r/dither-prism-hero.jsonSource
1"use client";23/* eslint-disable react/no-unknown-property */4import { useRef, useMemo, useEffect, useState } from "react";5import { Canvas, useFrame, ThreeElements, useThree } from "@react-three/fiber";6import * as THREE from "three";7import { motion } from "framer-motion";89import { cn } from "@/lib/utils";10import { WebGLErrorBoundary, WebGLFallback } from "./webgl-error-boundary";1112// Type augmentation for R3F13declare global {14 // eslint-disable-next-line @typescript-eslint/no-namespace15 namespace JSX {16 type IntrinsicElements = ThreeElements;17 }18}1920// ═══════════════════════════════════════════════════════════════════════════════21// VERTEX SHADER22// ═══════════════════════════════════════════════════════════════════════════════23const vertexShader = `24varying vec2 vUv;25varying vec3 vPosition;2627void main() {28 vUv = uv;29 vPosition = position;30 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);31}32`;3334// ═══════════════════════════════════════════════════════════════════════════════35// FRAGMENT SHADER - The magic happens here!36// ═══════════════════════════════════════════════════════════════════════════════37const fragmentShader = `38uniform float uTime;39uniform vec2 uResolution;40uniform vec2 uMouse;41uniform float uMouseIntensity;42uniform vec3 uColor1;43uniform vec3 uColor2;44uniform vec3 uColor3;45uniform float uDitherIntensity;46uniform float uPrismIntensity;47varying vec2 vUv;48varying vec3 vPosition;4950// ─────────────────────────────────────────────────────────────────────────────51// Hash functions for procedural noise52// … truncated
More from componentry
All 59 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Gradientanimated-gradient | componentry | Components | Free | no deps | |
| ASCII Effectascii-effect | componentry | Components | Free | no deps | |
| Aurora Flowaurora-flow | componentry | Components | Free | no deps | |
| auth-modalauth-modal | componentry | Components | Free | no deps | |
| border-beamborder-beam | componentry | Components | Free | no deps | |
| circuit-boardcircuit-board | componentry | Components | Free | no deps | |
| closing-plasmaclosing-plasma | componentry | Components | Free | no deps | |
| collection-surfercollection-surfer | componentry | Components | Free | no deps |
