skip to content
[readonly]

programs/pathtrace's CPU reference: tiles rendered in Z on every core with their digests, the image raster from tiles, and its PPM

sh
$ sexc add @ajax/mesh-ref-pathtrace
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 01:59v/# 1 version
  • drwxr-xr-x-Oct 27 01:59files/# the files of 0.1.0
latest
0.1.0, published Oct 27 01:59 by ajax
owners
ajax
license
MIT
dependencies
@ajax/pathtrace-z ^0.1.0, @ajax/pathtrace-scene ^0.1.0, @ajax/pathtrace-digest ^0.1.0, @ajax/pathtrace-default-scene ^0.1.0
dependents
@ajax/mesh-assemble
keywords
alphaos mesh reference pathtrace ppm
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-ref-pathtrace
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-ref-pathtrace
2
3programs/pathtrace's CPU reference: the renderer in the cluster float mode (`@ajax/pathtrace-z`, the same
4code the wasm image runs), so a tile rendered here is bit for bit the tile every backend must render.
5`mesh_pt_tile_render` renders one tile pass by pass (each pass's sums from +0, folded in pass order) and
6keeps every digest kcheck compares; `mesh_pt_tiles` renders many on every core; `mesh_pt_raster` and
7`mesh_pt_ppm` assemble the image.
8
9**Ported from** `crates/mesh-ref/src/pathtrace.rs`. Host only (POSIX threads).
10
11**Tested** by golden data from the Rust: a 64×48 image of the default scene (2 spp, 3 passes) under both
12tone maps — every tile's pass, accumulator and pixel digests, and the PPM's bytes.
13
14## Differences
15
16- Rust's `Tile` holds `Vec`s; here the accumulators and pixels are fixed arrays and the pass digests are
17  malloc'd (`mesh_pt_tile_free`). Out-of-memory returns false instead of aborting.
18- The Rust test `f32_and_z_agree` is covered by `@ajax/pathtrace-f32` and `-z` both matching the same Rust
19  tile digest.