A WASM rendering experiment

One mirror.
Three workloads.

A second raster view does not require a second scene graph—or even a second general culling traversal when the reflected set is known.

01 / Measured locally

Run the same fixed scene three ways

A · planar B · ray traced

Loading the WebAssembly renderer…

PathFPSms/framePixel fillVisibility / traversalSubmitted
Planar · two cullsMain and mirrored frusta
Planar · known setMain cull; authored mirror list
Software ray tracerStatic BVH; primary + water reflection rays

FPS is measured on this device, inside one optimized WebAssembly module. The rasterizer is a deliberately simple software emulation of two render views; the ray tracer uses a static median-split BVH and runs at the selected fraction of output pixels. Counters are per frame. No historical FPS is fabricated.

02 / Native GPU comparison

The same canal through WebGPU

WebGPU is the browser command layer, but the planar side is deliberately limited to a 2004-class workload: static triangle meshes, CPU visibility lists, vertex transforms, depth testing and one sampled reflection texture. No compute, mesh shaders, bindless resources or hardware ray traversal are used there. The ray side is portable WGSL compute with a static BVH—not an RT-core API.

A · 2004-style planar B · compute ray

Requesting a WebGPU adapter…

WebGPU pathFPSms/frameEffective pixelsVisibility / traversalSubmitted
Planar · two cullsTwo CPU visibility lists; two GPU views
Planar · known setAuthored reflection list uploaded once
Compute ray tracerStatic BVH; primary + water reflection rays

GPU FPS serializes complete submissions with queue.onSubmittedWorkDone(). It is end-to-end wall time rather than a display-refresh reading. Effective pixels are a transparent workload count, not hardware pipeline-statistics queries.

03 / What the counters establish

View count is not scene-graph count.

Dual cull tests every object against both cameras. Known set tests the main view once and directly submits the predeclared reflected subset. Both still rasterize the reflection; only one performs the disputed second culling traversal.

The ray tracer has no cost “per plane,” but it is not flat: its counters rise with traced pixels, secondary rays and BVH/AABB traversal. RT cores accelerate that work; they do not erase it.

04 / Historically accurate boundary

GPU ray tracing existed in 2004 research. An RT pipeline did not.

Researchers ran ray tracing on Radeon 9700 Pro-era GPUs by encoding scene data and ray state in textures and executing multipass fragment programs. There were no RT cores, hardware BVH traversal, compute shaders or DXR-like commands. Contemporary reported GPU throughput was roughly 0.3–4 million rays per second; custom SaarCOR hardware reached real-time primary-ray results in selected scenes.

That makes “Valve used something more expensive than ray tracing, which only works on a plane” indefensible as a statement about 2004. The limitation describes what the raster technique can represent; it does not reverse the contemporary cost comparison. One coherent raster view of one known water plane was a normal shipping workload. General ray traversal was research.

Source SDK 2013 exposes game-side code under Valve’s non-commercial Source 1 SDK license; it is not a permissively open-source release of Half-Life 2 and does not grant a clean right to republish the retail canal maps and assets in this standalone page. The canal here is original procedural geometry.