Volumetric cloud material. Color the sky, sun, and shadows, then fly the camera with mouse or touch.
Volumetric Vanta CLOUDS math in WGSL (vgpu). The canvas renders at devicePixelRatio / 3 (desktop) like the original Vanta runtime — full retina would raymarch ~115 steps per pixel and stall the page.
pnpm dlx shadcn@latest add @spaceui/components-shader-cloudDepends on vgpu. WebGPU required.
| File | Role |
|---|---|
cloud/index.tsx | vgpu surface, mouse ease, low-DPR backing store |
cloud/clouds.wgsl.ts | Raymarched fbm clouds (map2–map5) |
import { Cloud } from '@/components/shader/cloud'
export default function SpaceUI() {
return <Cloud className="h-96 w-full" sky="#68b8d7" cloudColor="#adc1de" sun="#ff9919" speed={1} />
}| Prop | Type | Default | Description |
|---|---|---|---|
bg | string | #ffffff | Scene background |
sky | string | #68b8d7 | Sky tint |
cloudColor | string | #adc1de | Cloud volume |
shadow | string | #183550 | Cloud shadow |
sun | string | #ff9919 | Sun disc |
glare | string | #ff6633 | Sun glare |
sunlight | string | #ff9933 | Direct light |
speed | number | 1 | Drift speed |
className | string | — | Wrapper class |
A dual-pass WebGL shader fluid simulation with chromatic wave refraction and Bayer 4x4 matrix ordered dither crossfading.
ViewAn interactive WebGL shader image component with cover UV mapping and dynamic cursor fluid-distortion ripples using data textures.
ViewA dual-pass WebGL shader component featuring real-time Navier-Stokes fluid pressure simulation and Bayer 4x4 matrix ordered dithering crossfade.
Viewpnpm dlx shadcn@latest add @spaceui/components-spaceui-uipnpm dlx shadcn@latest add @spaceui/components-shader-cloud