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.

Open all live demos → Browse prompt archive Jump to prompt index

Curriculum

#TechniqueDemoWhy it mattersSource prompts
01Geometry clipmap terraindemoInfinite ground at high near density, one drawSNOWFLOW waterbending Desert explorer
02Layered wind-anisotropic noisedemoDunes that look carved by weather, not isotropic fBmSNOWFLOW waterbending Desert explorer
03Persistent deformation bufferdemoFootprints/spells with berms that self-shadowSNOWFLOW waterbending Desert explorer
04Multi-scale snow / surface shadingdemoDetail that reads at dune, ripple, and grain scalesSNOWFLOW waterbending
05Wrapped diffuse + cheap SSSdemoThe term that makes snow/skin look translucentSNOWFLOW waterbending
06SDF blend-shell charactersdemoSeamless procedural bodies without raymarchingSDF blend-shell creatures
07Floating origin + log depthdemoLarge worlds without jitter and z-fightingThe Long Silence
08Bake vs evaluatedemoWhen noise is too expensive per pixelThe Long Silence
09Analytic atmosphere / skydemoSun elevation that moves the whole lookSNOWFLOW waterbending The Long Silence
10Post stack + tonemap disciplinedemoTAA-ready polish without clipping snow whiteSNOWFLOW waterbending Claude of Duty The Long Silence
11Swept-mesh wake / ribbon VFXdemoCoherent water/snow bodies, not particle mushSNOWFLOW waterbending
12Procedural PBR texture forgedemoZero art assets, tiled materials from noiseClaude of Duty SOLEBOUND

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.

DepressionHow far the surface is pushed down
Displaced massRaised berms at trail edges
Compression / iceMaterial 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

08

Bake vs evaluate

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:

  1. Zero allocations in the render loop — GC hitches destroy the AAA read
  2. Pipeline prewarm — first spell cast must not compile mid-frame
  3. 1% low / p99 frame time, not average FPS alone
  4. Shared includes — beauty and shadow use the same displacement/SSS code
  5. Quality toggles for every pass (A/B what costs quality)
  6. 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

02

Desert explorer

Process notes + reconstructed seed

03

Claude of Duty

Matt Shumer orchestrator FPS prompt

04

The Long Silence

Space game initial + visual /goal

05

SOLEBOUND

Max-effort shoe repair sim

06

SDF blend-shell creatures

Fable procedural critters

07

Bustling 3D city

One-shot city scene

08

COD Zombies clone

Lazy one-liner FPS

09

Tower crane sim

Autonomous construction

10

Panama Canal locks

Lock transit bake-off prompt

11

Painterly grass world

Reconstruction seed

12

Luxury mansion night

One-shot environment