Skip to content

Graphics demo - CPU render board

The colour is solved, not painted

A curated best-of the strongest CPU-rendered graphics demos from the OnlyCSharp fleet: a from-scratch, pure-C# real-time-ish 3D engine where every pixel is ray-traced through real physics rather than composited from decals.

linear PBR ray tracer soft shadows + AO SPH water Eulerian gas rigid-body + N-body pure C# / BCL-only

One engine, real physics. Every scene below is ray-traced on the CPU through a full linear-space Cook-Torrance PBR pipeline (sRGB-to-linear decode, GGX NDF + Smith geometry + Fresnel-Schlick, disc-sampled soft shadows, cosine-weighted AO, ACES tonemap, sRGB encode). Water is real smoothed-particle hydrodynamics with a Tait equation-of-state; air is a compressible Eulerian gas grid obeying the ideal-gas law (P = rho * R * T); motion is rigid-body dynamics with impulse collisions and Newtonian N-body gravity.

Zero engine dependencies. Nothing outside the .NET BCL. The only OnlyCSharp 1.7 reuse is the GIF byte-encoder, the seeded PCG32 RNG, and Perlin noise - never the maths, physics, or lighting, which are all original. Builds warnings-as-errors, 0/0, and every claim is backed by an in-engine self-test: all 30+ physics and lighting invariants pass green.

Night lighting show - four moving coloured lights sweep coloured soft shadows across the object-library board
The Lighting Show - coloured soft shadows, solved

The object-library board lit at night by four named, moving, coloured lights: a flickering campfire, a cool-white office key, a warm reading lamp, and a butane torch. They orbit a fixed camera so the coloured soft shadows sweep - block one light and the others' colours still reach the ground. Shadows are coloured, never black.

Technique: linear-space Cook-Torrance PBR, per-light disc-sampled soft shadows, inverse-square point lights, 96-frame seamless loop, 320x220 at 2x SSAA.

Dam-break SPH water sloshing with wooden balls bobbing on the surface
SPH Water + Buoyancy

A dam-break of ~750 smoothed particles sloshes in a box while wooden balls bob on the surface - Archimedes buoyancy emerges from the coupling, nothing is scripted.

Technique: SPH (poly6/spiky/viscosity kernels, Tait EOS pressure) coupled to rigid bodies through a real force field.

Dense steel balls dropped into a pool, splashing the SPH fluid
The Splash

Dense steel balls are dropped into the pool and punch through the surface, throwing real fluid spray - the two-way rigid-to-SPH coupling in its most violent form.

Technique: rigid-body impulse dynamics driving the SPH pressure field, two-way momentum exchange.

Hot buoyant plume of compressible gas rising, lofting foil balls
Eulerian Gas Plume

A hot plume rises by buoyancy through a compressible air grid, lofting light foil balls on real quadratic drag. Pressure obeys the ideal-gas law exactly; mass is conserved to 0.00%.

Technique: compressible Eulerian grid (rho, T, velocity), ideal-gas law P = rho * R * T, Boussinesq buoyancy, semi-Lagrangian advection.

A star with three planets in bound Newtonian orbits, lit by the star
N-Body Gravity

A star and three planets settle into bound orbits under softened Newtonian gravity (G * m1 * m2 / r^2), the whole system lit only by the star at its centre.

Technique: symplectic-Euler N-body integration, a single physical point-light at the star.

The calibration chessboard - the analytic shape library on a one-metre grid
The Calibration Board

The whole analytic shape library - sphere, box, capped cylinder and cone, disc, plane, ellipsoid, capsule - on an 8x8 one-metre checkerboard that doubles as a size ruler, each with a correct outward normal and its own intersection self-test.

Technique: analytic ray primitives, key + sky-fill + rim light rig, one still calibration frame.