skip to content
==> README.md <==
1# @ajax/pathtrace-rng
2
3The random numbers of programs/pathtrace: a counter-based hash (PCG's output function, Jarzynski & Olano
42020) of (seed, pixel, sample, dimension), so any sample is computable anywhere, in any order, on any
5backend. `pt_sample_key(seed, pixel, sample)` then `pt_rnd(key, d)`: dimensions 0–1 jitter the pixel,
6bounce b uses 2 + 8b … 2 + 8b + 7. Header only, freestanding.
7
8**Ported from** `crates/pathtrace-core/src/lib.rs` (`pcg`, `sample_key`, `rnd`). **Tested** through every
9camera sample of the renderer golden tests.