Realtime graphics techniques
A learning map distilled from the AI-built demos in the prompt archive.
Each technique has a short explanation, a live WebGL demo, and links to the
source prompts that used the idea.
Curriculum
Techniques in depth
01
Geometry clipmap terrain
Seen in: SNOWFLOW, desert explorer
Nested rings of mesh (or a single mesh tagged by ring level) centered on the player. Triangle density is high near the camera and falls off with distance. Vertices store only grid indices; world placement, CDLOD morphing, and height sampling happen in the vertex shader — no CPU rebuild, no per-frame upload of positions.
Prompt match: geometry clipmap or nested-ring LOD · sub-10 cm inner spacing · one static mesh, one draw call
02
Layered wind-anisotropic noise
Seen in: SNOWFLOW heightfield, desert dunes
Do not use a single fBm stack. Compose broad forms (tens of metres), medium drifts (metres), and fine ripples (decimetres). Stretch and shear medium/fine layers along a prevailing wind so lee faces and transverse ridges appear.
Prompt match: directional structure carved by a prevailing wind · sastrugi · lee-face asymmetry
03
Persistent deformation buffer
Seen in: SNOWFLOW §2.3, desert sand spells
A player-following render target stores world interaction: depression depth, displaced mass (berms), and compression/ice for shading. Address with toroidal UVs (fract(worldXZ / size)). Feet, surf, and spells all write through one brush(). Displace geometry in beauty and shadow passes so trails self-shadow. Refill with diffusion + decay.
| Depression | How far the surface is pushed down |
|---|
| Displaced mass | Raised berms at trail edges |
|---|
| Compression / ice | Material state for shading |
|---|
Prompt match: persistent and additive · never rebuild from a list of past events · trail that does not self-shadow is a failure
04
Multi-scale snow / surface shading
Seen in: SNOWFLOW snow material
Blend normals (and sometimes albedo detail) at multiple tiling frequencies by distance and slope. Add triplanar on steep faces. Analytic derivatives from the heightfield feed macro slope; fine scales provide grain.
Prompt match: detail at three tiling scales · surface detail legible at three distinct scales simultaneously
05
Wrapped diffuse + cheap SSS
Seen in: SNOWFLOW snow SSS, spell lights through berms
Snow and skin go dark too fast under Lambertian N·L. Wrapped diffuse softens the terminator; a back-scatter term adds a blue-white glow on the lit-through side. Dynamic lights should share the same SSS include as the sun.
Prompt match: this single term does more for reads-as-snow than almost anything else
06
SDF blend-shell characters
Seen in: Fable procedural creatures
Author a character from capsules/cones. In the vertex shader, snap each vertex onto the smooth-min SDF surface of all primitives so seams vanish. Normals from the SDF gradient. Still ordinary mesh rendering (cheap), not full-screen raymarching.
Prompt match: ragdoll-like primitives that look like one seamless body · mobile-performant tech-art solution
07
Floating origin + log depth
Seen in: The Long Silence
At planetary scale, float32 world positions jitter. Keep the player/ship at the origin and translate the world relative to it each frame. Use a logarithmic depth buffer (and opt custom shaders into it) so nested spheres don’t z-fight.
Prompt match: one world unit is one kilometre · floating origin · LOGD_* chunks
Seen in: Long Silence planet cubemaps
Twenty octaves of simplex per pixel per frame is not free. Bake expensive fields into textures/cubemaps at load (or when the view changes), then sample cheaply at runtime. Prefer cubemaps over equirect for planets (no poles/seams).
Prompt match: planets are baked, not evaluated · runtime shader is three texture taps
09
Analytic atmosphere / sky
Seen in: SNOWFLOW Nishita LUT, Long Silence Rayleigh shell
An analytic single-scattering sky (or a baked LUT driven by one) ties sun color, horizon warmth, and ambient tint to sun elevation. Stock HDRIs look good but don’t re-light correctly when you scrub time of day.
Prompt match: low warm sun · ambient strongly blue-shifted · elevation slider correctly drags horizon warmth
10
Post stack + tonemap discipline
Seen in: SNOWFLOW, Long Silence, Claude of Duty
Typical order: prepass → TAA → SSAO → SSR (selective) → DOF → bloom → volumetrics → AgX/ACES → grain → sharpen → FXAA. TAA stabilizes glints. Bloom in exposed units. Snow’s primary failure mode is clipped pure white — watch highlight roll-off. Measure 1% lows, not only average FPS.
Prompt match: blown-out white is the primary failure mode · TAA is essential
11
Swept-mesh wake / ribbon VFX
Seen in: SNOWFLOW snow-surf wake + water spells
Coherent fluid/snow bodies are swept meshes along a spine (path history in a data texture), not particle clouds. Cross-section (curl/amplitude) encodes a breaking wave; normals from the same function as geometry.
Prompt match: wake is a swept mesh, not a particle effect · one curl parameter from bank to hanging lip
12
Procedural PBR texture forge
Seen in: Claude of Duty materials, Solebound leather
Generate albedo / roughness / height from tiled noise at load, derive normals via Sobel or analytic derivatives, optional triplanar and edge wear from curvature. Zero runtime art pipeline.
Prompt match: GPU texture forge · no art assets · periodic noise so everything tiles
Cross-cutting engineering rules
These show up in every strong demo — put them in every prompt:
- Zero allocations in the render loop — GC hitches destroy the AAA read
- Pipeline prewarm — first spell cast must not compile mid-frame
- 1% low / p99 frame time, not average FPS alone
- Shared includes — beauty and shadow use the same displacement/SSS code
- Quality toggles for every pass (A/B what costs quality)
- Milestone screenshot gates — don’t proceed while it’s ugly
Prompt archive index
Each entry is a readable HTML page with the original prompt text, metadata, and related technique demos.
01
SNOWFLOW waterbending
Full WebGPU implementation brief
Techniques: Geometry clipmap terrain, Layered wind-anisotropic noise, Persistent deformation buffer, Multi-scale snow / surface shading, Wrapped diffuse + cheap SSS, Analytic atmosphere / sky, Post stack + tonemap discipline, Swept-mesh wake / ribbon VFX
02
Desert explorer
Process notes + reconstructed seed
Techniques: Geometry clipmap terrain, Layered wind-anisotropic noise, Persistent deformation buffer
03
Claude of Duty
Matt Shumer orchestrator FPS prompt
Techniques: Post stack + tonemap discipline, Procedural PBR texture forge
04
The Long Silence
Space game initial + visual /goal
Techniques: Floating origin + log depth, Bake vs evaluate, Analytic atmosphere / sky, Post stack + tonemap discipline
05
SOLEBOUND
Max-effort shoe repair sim
Techniques: Procedural PBR texture forge
06
SDF blend-shell creatures
Fable procedural critters
Techniques: SDF blend-shell characters
07
Bustling 3D city
One-shot city scene
Techniques: —
08
COD Zombies clone
Lazy one-liner FPS
Techniques: —
09
Tower crane sim
Autonomous construction
Techniques: —
10
Panama Canal locks
Lock transit bake-off prompt
Techniques: —
11
Painterly grass world
Reconstruction seed
Techniques: —
12
Luxury mansion night
One-shot environment
Techniques: —