Bract Engine

The engine, system by system.

About 400,000 lines of TypeScript and WGSL, organised into focused modules with strict contracts between them. Here is what is inside.

01 · Rendering

A renderer that thinks in GPU work, not draw calls.

Bract was designed for WebGPU from the start, not ported to it. The frame is built from compute: the GPU culls, bins and dispatches its own work, and a residency system pages data in as the camera needs it.

GPU-driven pipeline

Frustum, horizon and distance culling, LOD binning and indirect dispatch run in compute shaders.

Residency authority

Virtual-memory-style page allocation and eviction under a per-frame budget.

Virtual shadow clipmaps

Page-resident shadow maps driven by what receivers actually need, sharp up close and stable at distance.

PBR with spectral reflectance

Roughness, metallic and AO workflows, plus 8-sample spectral reflectance, detail normals and triplanar sampling.

HDR, scene-referred

16-bit targets, pre-exposure and tone mapping, with depth of field, motion blur and lens effects.

Temporal stability

Camera temporal history, temporal anti-aliasing and roughness-aware specular anti-aliasing.

02 · Lighting and atmosphere

Light that comes from the world itself.

The sky is simulated, not painted. A spectral atmosphere drives the sun, the sky dome and image-based lighting, so every surface sits in the same light as everything around it.

Spectral atmosphere

Precomputed sky lookup tables, updated live from celestial positions.

Environment IBL

GGX-prefiltered specular and irradiance convolution, taken from the live sky.

Clustered lighting

GPU light binning for dense punctual lighting at predictable cost.

Probe-based GIin progress

Probe-based global illumination for indirect light.

03 · World and scale

From orbit to ground in one coordinate system.

Large worlds break most engines at the edges, through precision loss, streaming hitches and shadow swimming. Bract treats scale as a primary constraint in every subsystem.

Double-precision world

Entity positions are stored in double precision and rendered through a floating, cell-anchored origin.

Dual spatial tree

Separate visual and physics trees, organised into cell bands for streaming.

Observer LOD grid

Multi-scale spatial grids driven by what the observer needs.

Celestial framework

Planets and stars placed from ephemeris data, connected to terrain at planetary scale.

04 · Procedural generation

Worlds generated, not hand-placed.

The generators are first-class engine modules. They are seeded and deterministic and run on the GPU or in WASM, so a world can be described in kilobytes and rebuilt anywhere.

Terrain generator

Layered noise stacks, biome layers and thermal, particle and wind erosion, run as GPU compute stages.

Terrain atlas

Virtual texture atlases with biome-driven surface materials and LOD streaming.

Foliage and scatter

Procedural trees compiled through WASM and scattered by biome, with LOD built in.

Modeling

Procedural mesh building with CSG, deformation kernels and surface generation.

05 · Simulation

Physics, water and effects you can reproduce.

Simulation runs in fixed steps and is deterministic by tier. The same inputs give the same world, which makes replays, networking and testing practical.

Three physics backends

Jolt, Havok and a native TypeScript solver behind a single adapter contract.

Determinism tiers

Bit-exact CPU math, structurally stable GPU generation and visually stable rendering, each guarded by CI canaries.

Water and fluids

FFT ocean surfaces and GPU-resident fluid state.

Particles and effects

Compute-driven particles and an effects framework with a budget governor.

Playbook animation

Data-driven event rules, keyframe curves and attachment lifecycles under budget control.

Spatial audio

Backend-abstracted audio with spatialisation and worklet processing.

06 · Platform

Engineered to last.

Every subsystem sits behind a typed contract, and every major decision is recorded before it is built. The engine is meant to grow for years without collapsing under its own weight.

Typed adapters

Rendering, physics, compute, audio, input and HUD backends can be swapped without changing game code.

Headless by design

A null render adapter runs the full engine in CI with no GPU attached.

ECS for state

Serializable state lives in an entity–component model built for persistence.

Decision records

64 architecture decision records cover the renderer, streaming, determinism, content and tooling.

Early access 2026

Build on Bract early.

Early access opens in waves for studios, technical artists and teams building large worlds on the web. Tell us what you are making.