WebAssembly + WebGPU ready

Ground-truth path tracing
for volumetric data

The demonstration uses Ground-Truth Path Tracing to render CT scans, providing highly accurate and physically-based visualization of volumetric medical data.

Ground-truth path tracing Editable transfer function WebAssembly + WebGPU
Progressive streaming
Adaptive 3D
Starts coarse, sharpens detail as you interact
Lighting
Physically-accurate
Multiple scattering, soft shadows, tone mapping
Interaction
Responsive
Live transfer function control and 3D cropping
Live rendering preview
Ground-Truth Path Tracer
GPU accelerated
From volume to insight

Workflow overview

01

Ingest & normalize

  • Decode DICOM CT into a scalar volume in Hounsfield Units (HU) using series rescale parameters.
  • Normalize HU into [0..1] with a configurable window while preserving voxel spacing (mm) for 1/mm gradients.
02

Build mip chain & compress

  • Generate a 3D mip pyramid from the base volume.
  • Prefilter coarse levels (e.g., separable Gaussian) to cut aliasing and stabilize low LODs.
  • Store each mip in R16_UNORM and gzip it for transport.
03

Progressive streaming

  • Begin with a coarse mip for instant interaction; stream finer mips in the background.
  • Refresh the resident 3D texture as mips land, resetting/continuing accumulation as needed.
04

TF-aware acceleration

  • Build a GPU MacroGrid (min/max or α_max per cell, driven by the opacity LUT).
  • Skip empty space and supply local majorants to reduce rejection in Woodcock/delta tracking.
05

Render & tone map

  • Trace volumetric paths with Woodcock (delta) tracking guided by MacroGrid majorants.
  • Evaluate transfer-function LUTs for opacity/materials; estimate normals via central differences scaled by spacing.
  • Accumulate temporally for stability, then tone map to SDR output.
Under the hood

Technical stack and dependencies

The application is a cross-platform C++ codebase that runs on native targets and in the browser via WebAssembly.

Rendering frontend

  • Built on DiligentCore for a unified API over multiple graphics backends

Web build (C++ → Wasm)

  • Compiled from C++ to WebAssembly using Emscripten for the browser target

In-module UI & plotting

Medical data conversion

  • DICOM datasets parsed and converted to raw voxel volumes in a Python preprocessing pipeline using pydicom

Reference volumes

  • Example datasets MANIX and MECANIX sourced from ngavrilov.ru