Skip to content
gamedevplPublic

About

Interactive WebGL2 graphics-effects lab: Pixel-Art Gaussian Splats, Evolution of Fire, and Evolution of Water.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

FX Lab

Interactive WebGL2 & WebGPU sandbox for real-time graphics effects from gamedev.pl.

Live demo: https://gamedevpl.github.io/fx-lab/

Included effects

  1. Pixel-Art Gaussian Splats (5 steps · Short · source & notes) — Procedural 3D Gaussian surfels rendered with EWA covariance projection, hard pixel grid snapping, 3-band stepped lighting, 24-color palette voting, Bayer 4×4 ordered dithering, and 1 px depth outlines.
  2. Evolution of Fire (8 eras, 1985–2026 · Short · source & notes) — Indexed palette cycling (CLUT), live 30 Hz PSX Doom cellular automaton, additive billboard sprite, soft particles with heat haze, baked 6-way directional lit flipbook with optical flow and blackbody HDR, 3D volumetric raymarching, sparse volume self-shadowing with split firelight GI, and a live 24×36×24 3D Navier–Stokes + vorticity confinement fluid solver with an interactive iron sphere collider.
  3. Evolution of Water (8 eras, 1985–2026 · Short · source & notes) — Indexed palette cycling, dual scrolling UV warp, Beer–Lambert depth absorption, Schlick Fresnel reflections, 6-wave Gerstner displacement with contact foam, Snell refraction with RGB caustics, spectral waves with backlit emerald SSS, and a live 128×128 zero-mean viscous shallow-water PDE with a 3D liquid splash crown, Worthington rebound jet, ballistic droplets, and click-to-ripple interaction.
  4. Evolution of Shadows (8 eras, 1988–2026 · Short · source & notes) — 1988 ground blob discs, planar y = 0 projection, Doom 3-style stencil volumes, real 88×88 hard shadow map aliasing, 16-tap Poisson PCF, PCSS contact-hardening, cone-traced ray-traced area lights with crevice AO and blue sky fill, and colored stained-glass shadows with crystal lens caustics and color-bounce GI.
  5. Evolution of Cloth (8 eras, 1988–2026 · Short · source & notes) — 1988 2-frame 32×24 pixel banner, rigid hinged flap, travelling sine-wave vertex shader, Verlet mass-spring physics, 2-hop bending stiffness with woven linen normal map, PBR Charlie velvet sheen + backlit translucency, stretch-free XPBD sphere wrapping, and per-triangle aerodynamic wind with PCF self-shadows and live tearing.
  6. Evolution of Fur (8 eras, 1992–2026 · Short · source & notes) — 1992 flat painted polygon mesh, directional normal maps, 8-layer & 40-layer instanced Shell Texturing with gravity combing and root AO, Kajiya–Kay anisotropic specular, Marschner dual-lobe scattering with golden backlit rim, 30,000 geometric clumped 3D hair strands, and a live 64×32 spring-damper wind, head-shake & petting groom.
  7. Evolution of Glass & Caustics (8 eras, 1995–2026 · Short · source & notes) — 1995 flat alpha transparency, studio env-map reflections, Schlick Fresnel (F₀ = 0.04), single-surface Snell refraction, thick double refraction with Beer–Lambert volume absorption, Cauchy chromatic dispersion, real-time 512×512 GPU photon-splatted caustics with frosted microfacets, and 4-bounce Total Internal Reflection with 98,304 six-band spectral caustic photons and interactive sun aiming.
  8. Evolution of Clouds & Sky (8 eras, 1992–2026 · Short · source & notes) — 1992 banded sky with 2D pixel sprites, 1997 skybox scrolling cloud plane, 2002 camera-facing 3D billboard puffs, physical Rayleigh & Mie atmosphere, GPU-baked 64³ tileable Perlin–Worley 3D volumetric raymarching, Beer–Lambert self-shadowing with Henyey–Greenstein silver lining, Nubis-style multi-scattering powder with storm anvil toggle, and real-time crepuscular god-rays with interactive time-of-day sun placement.
  9. Evolution of Grass & Foliage (8 eras, 1992–2026 · Short · source & notes) — 1992 flat pixel tile, 1996 crossed alpha-cutout X-cards (with wireframe toggle), 2001 10-layer stacked shell grass, 28,000 GPU-instanced 3D curved blades, multi-octave travelling wind waves & root AO, backlit golden subsurface scattering, 650 swaying 3D wildflowers with drifting cloud shadows & sunlit pollen, and a live 128×128 spring-damper trampling trail field parted by a rolling carved orb and mouse clicks.
  10. Evolution of Path Tracing (8 eras, 1975–2026 · Short · source & notes) — 1975 Blinn–Phong local rasterization, 1980 Whitted ray tracing (hard shadows, chrome mirror & Snell crystal glass), 1984 Cook distributed ray tracing (soft area shadows, glossy gold, thin-lens DoF & swinging pendulum motion blur), 1986 Kajiya 1 SPP unbiased Monte Carlo path tracing, multi-SPP progressive temporal accumulation, importance sampling + NEE + Veach MIS, ReSTIR multi-light RIS + 4-pass edge-stopping À-Trous SVGF denoising, and 2026 interactive real-time browser path tracing.
  11. Evolution of Toon & NPR Shading (8 eras, 1996–2026 · Short · source & notes) — 1996 Decaudin cartoon rendering (2-tone cel + Z/normal discontinuity ink), 1998 Gooch warm-to-cool technical illustration, 2000 cel-shaded games with authentic back-face Inverted Hull geometry, 2002 Wind Waker-style saturated cel ramps, 2009 Borderlands-style Sobel ink & comic cross-hatching, 2014 Guilty Gear Xrd artist-edited normals, ILM masks, UV inner lines & stepped anime timing, 2018 Spider-Verse-style Ben-Day halftone, shadow hatching, CMYK offset & mixed 1s/2s animation, and 2026 real-time 8-sector Anisotropic Kuwahara painterly oil brushstrokes driven by a GPU Structure Tensor.
  12. Evolution of Anti-Aliasing & Temporal Upscaling (8 eras, 1990–2026 · Short · source & notes) — 1990 Haeberli & Akeley 4×4 SSAA, 1993 hardware 4× MSAA (smooth geometry edges with remaining specular aliasing), 2011 Timothy Lottes FXAA, 2012 Jorge Jimenez SMAA (sharp textures while subpixel wires still break up), 2010–2013 Early TAA (Halo: Reach / Crysis 2 / UE4) showing motion ghosting, 2014 Motion Vectors + Catmull-Rom + YCoCg AABB clipping (Lottes 2011 / Malan 2012 / Karis SIGGRAPH 2014), Toksvig/Kaplanyan Specular AA, and FSR 2 / TSR-style 50%-axis (25% pixels) Halton(2,3) temporal upscaling with a clickable 4× pixel magnifier loupe.
  13. Evolution of Reflections (8 eras, 1976–2026 · Short · source & notes) — 1976 Blinn & Newell equirectangular environment mapping, 1996 Duke Nukem 3D / Unreal planar portal mirror, 1999 GeForce 256 / DX7 hardware cubemaps, 2011 Crysis 2 DX11 real screen-space reflections (SSR) exposing behind-pillar occlusion holes and off-screen clipping, 2012 parallax-corrected cubemaps (Bjorke 2004 · popularized by Lagarde & Zanuttini, SIGGRAPH 2012), 2013 Brian Karis Split-Sum roughness IBL, 2018 Battlefield V DXR ray-traced reflections, and UE5 Lumen / Cyberpunk 2077 RT Overdrive multi-bounce glossy reflections with contact hardening and temporal denoising.
  14. Evolution of Surface Detail (8 eras, 1978–2026 · Short · source & notes) — 1978 Blinn Bump Mapping, 1998 Normal Mapping (Cohen & Cignoni 1998 · Evolva / Giants 2000 · Doom 3 2004), 2001 Kaneko / Welsh Parallax Mapping, 2005 Policarpo Relief Mapping, 2006 Tatarchuk Parallax Occlusion Mapping (POM) with live heightfield soft self-shadows (flat silhouette), 2009 programmable DX11 Tessellation & Displacement with wireframe toggle (true jagged 3D silhouette!), 2018–2020 NVIDIA Turing / DX12 Ultimate Meshlets, and 2022–2026 UE5 Nanite-style virtualized micropolygon clusters (emulated in WebGL2 via dense vertex-displaced meshes).
  15. Evolution of Fog & Volumetric Lighting (8 eras, 1997–2026 · Short · source & notes) — 1997 Turok / 1999 Silent Hill distance depth fog (masking far-clipping), 2002 Hoffman & Preetham analytical Rayleigh/Mie aerial perspective, 2004 pre-2007 shadow-map 3D light-shaft slices, 2007 Kenny Mitchell (GPU Gems 3 Ch. 13) screen-space radial god rays smoothly fading out when looking away, 2009 Tóth & Umenhoffer 3D raymarched volumetric shadows with interleaved sampling toggle, 2014 Bart Wronski temporal froxel fog (emulated in WebGL2, with Froxel Grid overlay), 2015 Sébastien Hillaire / Frostbite heterogeneous swirling mist & local colored lanterns, and 2020–2026 Hillaire (EGSR 2020) multi-scattering with stained-glass cathedral sunbeams sliced by a turning iron clockwork gear.
  16. Evolution of Global Illumination (8 eras, 1996–2026 · WebGPU Compute + WebGL2 fallback · Short · source & notes) — 1996 Quake baked lightmaps (breaking when you move the lamp), 1998–2004 Greger irradiance volumes & Half-Life 2 Ambient Cube probes (leaking through a thin wall), 2007 Crysis SSAO (explicitly occlusion, not GI), 2009 Ritschel SSDO / SSGI (vanishing when looking away; noting LPV 2009), 2011 Crassin 3D Voxel Cone Tracing (32×24×32 3D storage textures in WebGPU; noting Enlighten BF3), 2019 Majercik DDGI octahedral probes + Chebyshev visibility (killing thin-wall leaks), 2022 UE5 Lumen-style software SDF multi-bounce GI, and 2023–2026 Alexander Sannikov Radiance Cascades (C2→C1→C0 compute cascades with live 8×8 probe-block inspector).
  17. Evolution of Texture Mapping (8 eras, 1994–2026 · Short · source & notes) — 1994 PS1 affine texture warping (vAffUv / vClipW exact noperspective emulation) & GTE vertex snapping, 1996 Quake 16-pixel span perspective (Michael Abrash), 1996 3dfx Voodoo bilinear filtering (blurry up close, shimmering horizon), 1996 mipmapping & trilinear (Williams '83 noted; Show Mip Levels), 1998 S3TC/DXT1 live 4×4 RGB565 block compression (Show 4×4 Blocks), 2001 16× Anisotropic Filtering (GeForce 3 vs angle-dependent Radeon 8500 toggle), 2011 RAGE MegaTexture live 64×64 virtual page pop-in (Snap Turn), and 2020–2026 DX12 Sampler Feedback streaming (emulated in WebGL2, Feedback Map).
  18. Evolution of Portals & Impossible Spaces (8 eras, 1994–2023 · Short · source & notes) — 1994 Marathon overlapping non-Euclidean rooms, 1996 Build / Duke Nukem 3D overlapping sectors (Sector Glitch!) & portal mirrors (Descent '95 noted), 2006 Prey fixed tilted 3D portals (Narbacular Drop '05 noted), 2007 Portal recursive Blue↔Orange infinite corridor (Depth 1 vs 8, click to move Orange portal), 2013 Antichamber look-away shifting rooms, 2018 CodeParade 1.8 m-outside / 22 m-inside pavilion (Outside / Inside), 2022 Portal with RTX light beams, shadows & reflections passing straight through portals (WebGL2 SDF ray-teleportation), and 2023 Viewfinder 2D Polaroid stamping real 3D geometry & sky into concrete walls (Stamp Photo 3D).
  19. Evolution of Tone Mapping & HDR (8 eras, 2002–2024 · Short · source & notes) — True RGBA16F floating-point HDR neon alley with separable HDR bloom, live dual response-curve graph, and interactive EV drag (−3 to +5.5 EV): Pre-2002 LDR Clamp ("Notorious 6" neon-red to yellow clipping), 2002 Reinhard, 2004–05 Far Cry 1.3 & Half-Life 2: Lost Coast bloom + tunnel adaptation, 2010 Uncharted 2 (Hable & Hejl), 2014–17 ACES Filmic (Narkowicz / UE 4.15), 2016–17 Lottes & GT Sport Uchimura, 2023 Blender 4.0 AgX, and 2024 Khronos PBR Neutral + Tony McMapface.
  20. Evolution of 3D Pixel Art (8 eras, 1992–2023 · Short · source & notes) — Multi-MRT coastal windmill island diorama with a draggable 4× pixel magnifier loupe: 1992 Comanche Voxel Space heightmap columns, 1994 Donkey Kong Country 8-angle pre-rendered sprites + Bayer dither, 1997 Blood 3D DDA cubic voxels, 2018 Dead Cells cel + 1 px outlines, 2018 Octopath Traveler HD-2D (pixel sprite + 3D tilt-shift DoF + bloom), 2018 Return of the Obra Dinn world-locked 1-bit dither toggle, 2019 A Short Hike naive low-res shimmer, and 2021–23 t3ssel8r orthographic texel-snapped sub-pixel camera + depth/normal outlines.
  21. Evolution of Character Animation (8 eras, 1989–2020 · source & notes) — Articulated 3D humanoid on an interactive stepped stone arena: 1989 Prince of Persia 12 fps rotoscoped 2D sprites, 1992–93 Alone in the Dark / Virtua Fighter rigid polygon puppets, 1996 Quake MDL per-vertex keyframe morphing, 1998 Half-Life / LBS 180° candy-wrapper collapse, 2006–09 Gears of War blend trees & real 2-bone analytical Foot IK on stairs, 2007 Kavan Dual Quaternion Skinning, 2008 passive ragdoll vs GTA IV Euphoria active PD-muscle physics, and 2016–20 Motion Matching & neural locomotion (WASD / click-to-steer).
  22. Evolution of Skin & Subsurface Scattering (8 eras, 1975–2021 · source & notes) — True RGBA16F multi-pass Separable SSS on a classical 3/4 sculpted bust with thin translucent ears & orbiting backlight: 1975 Phong plastic, 2001 Jensen Dipole BSSRDF, 2004 Wrapped Diffuse / Half-Lambert, 2007 GPU Gems 3 Texture-Space Diffusion, 2009 Jimenez Screen-Space SSS, 2011 Penner Pre-Integrated curvature LUT, 2013–15 Digital Ira Separable SSS + Burley Normalized Diffusion + dual-lobe GGX specular, and 2021 MetaHuman-era volumetric Random-Walk SSS + peach-fuzz sheen.
  23. Evolution of Terrain & Level of Detail (8 eras, 1992–2024 · source & notes) — Real-time dynamic alpine mountain range with color-coded barycentric wireframe split-screen & Freeze Frustum inspector: 1992 Comanche Voxel Space, 1996–97 Lindstrom CLOD & ROAM adaptive binary triangle tree, 2000 GeoMipMapping T-junction cracks & popping, 2002 Chunked LOD vertical skirts, 2004–05 Geometry Clipmaps concentric rings, 2009–10 CDLOD geomorphing & H.A.W.X 2 DX11 tessellation (emulated), 2011–12 Battlefield 3 virtual terrain textures, and 2021–24 UE5 Nanite cluster meshlet LOD (emulated).
  24. Evolution of Motion Blur (8 eras, 1999–2024 · source & notes) — 4-pass RGBA16F aerospace/motorsport test studio with spinning 3-blade rotor, speeding racing capsule, swinging pendulum & static foreground pillar: 1999 GTA III frame-blending trails, 2004 Camera-Only nausea blur, 2007 Crysis per-object velocity silhouette clipping, 2012 McGuire TileMax + NeighborMax, 2014 Guertin & McGuire Soft-Z depth weighting, 2016 DOOM curved rotational arc blur, 2019 180° cinema shutter (24 FPS Strobe toggle), and 2024 16-tap reconstruction with live RGB Velocity Buffer inspector.
  25. Evolution of Depth of Field & Bokeh (8 eras, 1998–2024 · source & notes) — 4-pass RGBA16F HDR optical studio with 32 real HDR pinpoint night lights, wet reflections, near-field crystal & sharp centerpiece: 1998 pinhole camera, 2001 Metal Gear Solid 2 Gaussian Z-blur halo bleed, 2004 GPU Gems 1 depth-aware gather, 2007 Crysis layered near/far CoC dilation, 2011 Battlefield 3 6-blade hexagonal aperture bokeh, 2014 UE4 Vogel spiral disk + optical rim, 2018 cat's-eye mechanical barrel vignetting, and 2024 2× anamorphic oval bokeh + LoCA with live click-to-focus & CoC heatmap.
  26. Evolution of Destruction & Fracturing (8 eras, 1998–2023 · WebGPU Compute + WebGL2 fallback · source & notes) — Blast the same brick-and-concrete watchtower across 8 parallel eras of real-time destruction: 1998 Half-Life func_breakable gib swap, 2001 Red Faction Geo-Mod CSG boolean carving (floating upper floors!), 2003 Max Payne 2 Havok rigid-body debris, 2008 Bad Company pre-cut walls vs The Force Unleashed DMM material bending, 2009 Red Faction: Guerrilla structural load-stress collapse (Bad Company 2 '10 noted), 2013–19 real-time impact Voronoi fracture (Müller '13 · R6 Siege '15 · UE 4.23 Chaos '19), 2020–22 Teardown 48×72×48 3D DDA voxel destruction & flood-fill island detachment, and 2023 The Finals-scale compound demolition with 8,192 GPU-simulated debris chunks (?renderer=webgl2 inspects the 49K-voxel / 1,024-debris WebGL2 fallback).
  27. Evolution of Collision Detection & Tunneling (8 eras, 1988–2024 · WebGPU Compute + WebGL2 fallback · source & notes) — Why fast bullets clip through walls across 36 years of physics engines: 1988 GJK & discrete tick-gap tunneling, 1993 Doom p_map.c directional fireball clipping bug (missing abs() lets West shots phase through solid walls while East shots hit!), 1995 I-COLLIDE Sweep-and-Prune 1D axis brackets, 1996 Quake BSP inflated Minkowski hull & OBBTree SAT, 2007 GPU Gems 3 3D GPU spatial hash broadphase (4,096 bodies on WebGPU), 2011–13 Erin Catto Speculative Contacts & TOI (Diablo 3), 2017–18 PhysX 3.4 & Unity Continuous Dynamic CCD, and 2019–24 Chaos, Jolt & Box2D 3.0 4,096-bullet WebGPU Swept CCD + the fast-spinning long-rod rotational tunneling edge case.
  28. 3D World-Space ASCII & CRT (8 steps · source & notes) — Why classic 2D screen-space ASCII shaders swim and crush detail on zoom, and how 42,000+ upright camera-facing 3D billboards (zero UV-mapped wall textures, single gl.drawArraysInstanced draw call behind an opaque Z-buffer core) optically blend into a dark gothic painting from afar and reveal razor-sharp horizontal < > + ; ~ rows and S Z z N # typography on 7.4× exponential zoom: clean Blender-sculpted walking gothic bishop (mitre, Roman collar, crimson stole, brass cross lantern), 2D luminance & Sobel / \ | _ filters, 100% camera-facing world billboards, 3D chiaroscuro lighting, 5-ghost spectral dash, charset/palette toggles (ASCII, Code, Hangul) and subtle analog CRT bloom at 60 FPS.

Project structure

Each effect lives in its own self-contained folder under docs/effects/<id>/ with a technical README.md, CPU scene/simulation module, GLSL shader module, and WebGL2 renderer:

docs/
├── index.html                                                                                              # Root entry (loads default effect)
├── splats/ fire/ water/ shadows/ cloth/ fur/ glass/ clouds/ grass/ pathtracing/ toon/ aa/ reflections/ surface/ fog/ gi/ textures/ portals/ tonemapping/ pixel3d/ animation/ skin/ terrain/ motionblur/ dof/ destruction/ collisions/ ascii/ # Clean per-effect routes with dedicated Open Graph cards
├── src/                                                                                                    # Shared app shell, catalog metadata, WebGL2 helpers
└── effects/
    ├── splats/                                                                                             # README.md · scene.js · shaders.js · index.js
    ├── fire/                                                                                               # README.md · simulations.js · shaders.js · index.js
    ├── water/                                                                                              # README.md · simulation.js · shaders.js · index.js
    ├── shadows/                                                                                            # README.md · shaders.js · index.js
    ├── cloth/                                                                                              # README.md · simulation.js · shaders.js · index.js
    ├── fur/                                                                                                # README.md · groom.js · shaders.js · index.js
    ├── glass/                                                                                              # README.md · optics.js · shaders.js · index.js
    ├── clouds/                                                                                             # README.md · atmosphere.js · shaders.js · index.js
    ├── grass/                                                                                              # README.md · scene.js · shaders.js · index.js
    ├── pathtracing/                                                                                        # README.md · shaders.js · index.js
    ├── toon/                                                                                               # README.md · scene.js · shaders.js · index.js
    ├── aa/                                                                                                 # README.md · shaders.js · index.js
    ├── reflections/                                                                                        # README.md · shaders.js · index.js
    ├── surface/                                                                                            # README.md · mesh.js · shaders.js · index.js
    ├── fog/                                                                                                # README.md · shaders.js · index.js
    ├── gi/                                                                                                 # README.md · wgsl.js · webgpu.js · webgl2.js · shared.js · index.js
    ├── textures/                                                                                           # README.md · mesh.js · atlas.js · shaders.js · index.js
    ├── portals/                                                                                            # README.md · shaders.js · index.js
    ├── tonemapping/                                                                                        # shaders.js · index.js
    ├── pixel3d/                                                                                            # shaders.js · index.js
    ├── animation/                                                                                          # mesh.js · shaders.js · index.js
    ├── skin/                                                                                               # shaders.js · index.js
    ├── terrain/                                                                                            # lod.js · shaders.js · index.js
    ├── motionblur/                                                                                         # shaders.js · index.js
    ├── dof/                                                                                                # shaders.js · index.js
    ├── destruction/                                                                                        # shared.js · wgsl.js · webgpu.js · webgl2.js · index.js
    ├── collisions/                                                                                         # shared.js · wgsl.js · webgpu.js · webgl2.js · index.js
    └── ascii/                                                                                              # atlas.js · priest-mesh.js · scene3d.js · shaders.js · index.js

Controls

  • Drag — Orbit and tilt the camera
  • Scroll / Pinch — Zoom in and out
  • Double-click / R — Reset camera
  • Drag amber divider / S — Toggle and slide before/after split-screen comparison
  • ← / → — Step backward or forward
  • Space — Pause or resume simulation
  • M — Toggle procedural sound effects & scene ambience (Web Audio API)
  • B — Toggle adaptive procedural background music
  • E — Open the effects catalog
  • 1–9 — Jump directly to an effect
  • Click pool (Water Step 8) — Inject live concentric ripples

Running locally

No build step and no external dependencies — plain ES modules and raw WebGL2 inside docs/.

python3 -m http.server 8080 --directory docs

Then open http://localhost:8080/.

License

MIT — see LICENSE.

About

Interactive WebGL2 graphics-effects lab: Pixel-Art Gaussian Splats, Evolution of Fire, and Evolution of Water.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors