programs/pathtrace's counter-based random numbers: the PCG output hash of (seed, pixel, sample, dimension)
$ sexc add @ajax/pathtrace-rng- 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
- none
- dependents
- @ajax/pathtrace-sample
- keywords
- alphaos mesh pathtrace rng pcg
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/pathtrace-rng
- repository
- https://github.com/thomasdavis/alpha-c-mesh
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.