Skip to content

feat(registry): Three.js shaders catalog — 4 new GPU effects + showcase project#669

Open
miguel-heygen wants to merge 4 commits intomainfrom
feat/threejs-shaders-catalog
Open

feat(registry): Three.js shaders catalog — 4 new GPU effects + showcase project#669
miguel-heygen wants to merge 4 commits intomainfrom
feat/threejs-shaders-catalog

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

Summary

New three-js category for the registry with 4 original GPU compositions, plus a showcase project that assembles all shader effects for the tech article video clips.

New blocks

Block Duration Technique Render (SwiftShader)
vfx-cinematic-camera 16s DamagedHelmet GLTF + 4 camera moves (dolly zoom, crane, orbit, rack focus) 108ms/frame
vfx-god-rays 8s Screen-space radial blur post-process, occluding pillars, dust particles 107ms/frame
vfx-particle-field 10s 8k GPU particles morphing: text → sphere → torus with additive blending 167ms/frame
vfx-ray-march 8s Pure GLSL SDF raymarching — infinite tunnel with fractal folds + octahedron pillars 117ms/frame

Techniques

Cinematic Camera — Four classic cinema moves applied to a 3D scene containing the KhronosGroup DamagedHelmet (CC-BY 4.0). Each move demonstrates a different camera technique:

  • Dolly Zoom: Camera pulls back while FOV narrows — Hitchcock vertigo effect
  • Crane Shot: Rise from below, arc over the subject
  • Orbit: Smooth 216° orbit with vertical sinusoidal variation
  • Rack Focus: Punch in tight, hold, pull out dramatically

Volumetric God Rays — Multi-pass screen-space post-processing:

  1. Render scene normally
  2. Render occlusion map (black occluders, white sun)
  3. Radial blur from sun position through occlusion → god rays
  4. Additive composite with warm tint

Particle Field — Custom vertex + fragment shaders for GPU point rendering. Particles lerp between 5 target shapes (text bitmap sampling, sphere, torus, noise) with smooth morphing transitions. Additive blending + per-particle size attenuation.

SDF Ray March — Single-pass fullscreen fragment shader. Signed distance field scene with:

  • Infinite Z-repeat for tunnel effect
  • smin() smooth minimum for organic geometry blending
  • Morphing octahedron pillars with per-cell rotation
  • Chromatic coloring from surface normal + position
  • Exponential fog + vignette + Reinhard tone mapping

Showcase project

packages/studio/data/projects/threejs-shaders-catalog/ — master index.html composes all 17 effects (3 flagship VFX + 14 shader transitions from existing blocks) into a 112s renderable reel. Each composition is also individually renderable.

Test plan

  • All 4 new blocks render successfully on SwiftShader (no GPU)
  • Cinematic camera loads DamagedHelmet GLTF and all 4 camera moves animate
  • God rays post-process composite produces visible light shafts
  • Particle field morphs through all 5 target shapes
  • Ray march produces visible tunnel with fractal geometry
  • Existing registry blocks unmodified
  • Render on GPU hardware for production-quality output

🤖 Generated with Claude Code

— Magi

miguel-heygen and others added 4 commits May 7, 2026 16:40
showcase project for the tech article — 17 compositions individually
renderable via the HyperFrames producer.

3 flagship HTML-in-Canvas effects (liquid glass, device mockup, shatter)
plus 14 GLSL shader transitions organized by category.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
four new compositions for the Three.js shaders article:

- vfx-cinematic-camera: dolly zoom, crane shot, orbit, rack focus
  applied to HTML content in a Three.js scene (16s)
- vfx-god-rays: screen-space radial blur god rays through occluding
  pillars with dust particles and camera orbit (8s)
- vfx-particle-field: 8000 GPU particles morphing between text,
  sphere, torus, and noise states with additive blending (10s)
- vfx-ray-march: pure GLSL raymarching through morphing SDF tunnel
  with fractal folds and octahedron pillars (8s)

all render on SwiftShader (no GPU required) at 45-167ms/frame.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
replaces the flat HTML plane with the KhronosGroup DamagedHelmet GLTF
model (CC-BY 4.0, 3.6MB). four camera moves orbit, dolly, crane, and
rack-focus around the PBR helmet with dramatic three-point lighting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant