vidar.games

Game tech, rebuilt and compared

Game rendering and simulation techniques, rebuilt from open-source code and shown side by side.

Success is not final, failure is not fatal: it is the courage to continue that counts.

LTC area lights (LTCGI)
A video screen, two light tubes and a tilted triangle light this room as real polygons. On polished tiles the screen reflects as a sharp picture, on rough tiles as a soft glow.
Anime crystal shader
These gems have no transparency and no real refraction. The sparkle is two layers of triangle noise, looked up through a bent view vector and lit by the light behind the face.
Physically based sky atmosphere
A sunrise over seven ridge lines, built from four lookup tables. The far ridges sink into the sky because the sky and the distance haze come from the same scattering maths.
Interactive ground fog
Ground fog that opens when someone walks through it, curls into the gap, then slowly closes again. Underneath is a 2D fluid sim on a 256 x 256 grid, drawn as 16 flat planes.
Strand hair simulation
6,000 strands on a turning head. On the left only gravity and length hold them, and the hair drops straight through the skull. On the right, shape constraints and two spheres keep the style.
Position-based fluids
29,160 particles fall as an 8 m column into a tank with a baffle. Without a density constraint they fold into one flat sheet. With it they splash over the baffle and keep their volume.
Occlusion-aware lens flare
A low sun behind a line of pines. The lens flare switches off when a trunk covers the sun and comes back when it clears, decided by one depth texel per frame.
CSG booleans
A cube, a sphere and three cylinders. Four boolean cuts on plain triangle meshes, each one a BSP tree clipping another BSP tree.
Touch-bending grass
A stone ball rolls through 48,000 grass billboards. Every tuft checks up to 16 benders in its vertex shader and leans away from any it is inside.
Marching cubes terraforming
A glowing brush digs a cave into a hillside, then builds an arch out of thin air. Underneath: byte voxels and marching cubes, re-meshed one 16-voxel chunk at a time.
Mesh-projected decals
A flat decal quad floats off a round pillar, sinks into steps and flickers on the floor. driven-decals cuts a new mesh from the surfaces inside the decal box instead, so the paint follows every step.
Screen-space reflections (SSR)
A polished floor often reflects a baked cubemap, so a rolling ball never shows up in it. Screen-space reflections march rays through the depth buffer and reuse the frame already drawn.
GPU boids
4,096 fish, same seed, same moving target. Left: each fish only steers at the target, and they pile into a clump. Right: three local rules, checked against every other fish each step, make a school.
Volumetric fog
Same ruined hall, same sun, same frame. Left: the usual height fog, one grey layer. Right: the fog is stored in 1.8 million cells, each lit and shadowed on its own, so light shafts appear.
GPU mass-spring cloth
A cloth that waves from a sine wave looks fine until something touches it. A mass-spring grid on the GPU has 4,096 nodes, each pulled by up to 8 neighbours, so a ball shoves it out of the way.
Screen-space global illumination (SSGI)
A spotlight hits a red wall and only the wall gets lit. Screen-space GI shoots rays from every pixel, reads the colour they hit on screen, and spills that red onto the floor, boxes and ceiling.
Wind field simulation
Sine wind sways every blade in step. A wind field remembers where air was pushed: a blast spreads out, a rolling rock leaves a wake, a vortex swirls and then fades.
Temporal anti-aliasing (TAA)
Thin wires and a checker floor shimmer at 1 sample per pixel. TAA shifts the camera by under a pixel every frame and blends each frame with the last.
Dual-quaternion skinning
Same arm, same two bones, same weights.
Hi-Z occlusion and chunk culling
40,000 small objects in a city of grey blocks. Left draws everything inside the view: 12,364. Right tests chunks, then objects, against a Hi-Z depth pyramid: 1,953.
PCSS contact-hardening soft shadows
Real shadows are sharp where an object touches the ground and soft where it is far away. A single shadow-map test can't do that. PCSS can, from the same shadow map.
Voxel cone tracing global illumination
One light moving through a closed room.
Interior mapping
1,490 rooms in this city, and not one of them is geometry. Each window is a flat quad. Per pixel, a ray goes into an imagined box and picks floor, ceiling or wall.
Motion matching
Same stick input, same 5 minutes of mocap.
XeGTAO ambient occlusion
Same shot three times: no AO, a basic 16-sample SSAO, and Intel's XeGTAO ported from HLSL to three.js.
Animated crowd instancing (VAT)
Left: 300 creatures, each its own skinned mesh and skeleton, 300 draw calls.
Dense-looking particles
Same 400 particles on both halves, same emitters, same motion.
Wang-tile terrain
Same grass and water grid on both halves, 16 pixel tiles each.
GPU particle shatter
One rendered frame of a room becomes 115,200 GPU particles.
Parkour momentum controller
Same rooftop course, same jump presses.
Layered destruction
Same pillar, same 16 shots on both sides.
Procedural dribble + IK
Same ball, same bounces on both sides.
Metaball droplet refraction
Five drops of water, made from one field and one marching-cubes mesh.
Active ragdoll
Same 14 kg ball, same rapier.js world.
BSP draw order
This tank is drawn with no depth buffer and no sorting at runtime.
Build-up burst filter
A bar fills for 5.5 s. When it's full, the screen takes one hit, gone in half a second.
Pixel-art normal-map lighting
Flat pixel art, lit like it has volume.
Live light-map bake
The soft light in this room is baked into a texture, and it gets baked again every frame while a wall moves.
Heartbeat damage vignette
Health drops from 100% to 10% on both halves of this walk.
FFT ocean
Most game seas are a few sine waves added together.
LUT colour grading
One frame, three moods. No relighting, no new render.
Spell VFX fields
Same fire bolt, same seed on both halves.
Panic filter
One number from 0 to 1 makes a calm night at sea feel wrong.
Real-time water caustics
Sunlight through a moving water surface draws bright lines on the pool floor.
Occlusion wall cutout (dithered)
A wall sits between the camera and the character.
Meshlet cluster culling
49 million triangles of rocks, drawn twice.
Stylized water layers
This stylized water is 7 colours added together.
Iris remap on pupil dilation
The pupil grows from 3.5 mm to 7.8 mm on both eyes.
Voxel volumetric clouds
Minecraft-style clouds, two ways. Same voxels, same Worley noise.
Procedural feet + IK
16 legs, the same body path on both sides.
Hex-tiling anti-tiling
Same 3 m ground texture on both halves of this field.
Radiance cascades GI
Same courtyard, same budget: 6.45 M rays per frame on each side.