Repository navigation
raw-native 0.3.0
raw-native renders a test scene on the CPU, computes ambient occlusion two ways, measures how far the fast screen-space estimate drifts from a ray-traced reference, and writes a JSON certificate with the verdict. Version 0.3.0 makes that certificate checkable from data alone and adds a WebAssembly build that writes the same certificate as the native one.
Download and run
| File | Platform |
|---|---|
raw-native-0.3.0-windows-x64.zip |
Windows 10 or 11, x64. Static runtime, no installer. |
raw-native-0.3.0-linux-x64.tar.gz |
Linux x64 with glibc 2.38 or newer (Ubuntu 24.04, Debian 13). |
raw-native-0.3.0-wasm.zip |
Browser or Node. Also published loose: raw-native.wasm, raw-native.mjs, raw-loader.mjs. |
sha256sum -c SHA256SUMS
raw_native_cli --out ./out
raw_native_cli verify ./out # recompute RMSE and max error from the written filesWhat is new
- Certificate schema
raw-cert/2: the renderer version, the canonical params, the sample counts (64 ray-traced, 24 screen-space) and the SHA-256 of every output file. ao_rt.pfm,ao_ss.pfmandmask.pgm: 32-bit AO buffers and the coverage mask, so a checker can recompute RMSE and maximum error exactly.raw_native_cli verify <dir>andscripts/recheck.pyboth do it.--tolerance, recorded in the certificate.--no-rtfor a raster-only run.--threadsfor a parallel render with identical output.--bench <runs>for timing.- A WebAssembly build and a loader that checks both files against a SHA-256 before running them.
- License: from 0.3.0, raw-native is released under FSL-1.1-MIT. Version 0.2.0 and earlier stay under MIT, as released.
Checked before release
- 31 of 31 tests pass with MSVC 19.50 (Windows) and GCC 13.3 (Ubuntu 24.04), and in CI on GitHub's Windows and Ubuntu runners.
- The default render's
certificate.jsonis byte-identical from the Windows binary, the Linux binary and the wasm build, run from these release files: SHA-256fc9ac76b.... The ten image and data files it names hash the same on all three.arena_certificate.jsondiffers between them, because the standard library's allocation sizes differ by platform; each one readsverified. - At 512 x 512, five camera views, the wasm build's output files hash the same as the native build's. Evidence:
evidence/wasm-vs-native-512.json. - The default view's verdict is
refuted(RMSE 0.1294 against 0.12 at 256 x 256). That is the measurement, not a defect.
Speed
Median of 5 renders in milliseconds, one machine (Intel Core i7-13700KF, Windows 11), wasm in a Worker in Chromium 154. Full raw runs in evidence/bench-*.json.
| Frame | Mode | wasm | wasm SIMD | wasm threads (24) | native | native 24 threads |
|---|---|---|---|---|---|---|
| 256 x 256 | Full | 252 | 298 | 32 | 258 | 241 |
| 512 x 512 | Full | 1,013 | 1,143 | 127 | 1,028 | 293 |
| 1440 x 900 | Full | 4,646 | 4,881 | 523 | 4,527 | 613 |
| 256 x 256 | No RT | 27 | 31 | 5 | 29 | 114 |
| 512 x 512 | No RT | 110 | 116 | 21 | 118 | 119 |
| 1440 x 900 | No RT | 533 | 541 | 85 | 527 | 199 |
The threaded wasm build needs SharedArrayBuffer, which a browser grants only to a page sent with COOP and COEP headers. GitHub Pages cannot send them, so a Pages site can serve the single-threaded build only.
Limits
One built-in test scene and no model loader. The reference is a 64-sample estimate, repeatable but not exact. A pass on RMSE says nothing about the worst pixel. Native threading starts fresh threads per pass, which costs more than it saves at small frames. Byte-identical output is checked on x86-64 hosts only.