- from_interleaved ignored its arg, so D65 came from a separate hand-normalized table that was scaled to luminance 1 instead of CIE_Y_integral and mapped to 300nm when it starts at 360nm. sRGB rgb_from_xyz came out ~120x too large with the wrong white point, making every render ~120x too bright with a colour cast. Now built as pbrt does: from_interleaved(&CIE_ILLUM_D6500, true). - LayeredBxDF::Tr: puts the minus on the result, not the exponent, so transmittance was negative and grew exponentially. killeroo-coated-gold went from 15 Infs / min -4168 / stddev 638 to clean. - layered.rs used Float::MIN where C++ has numeric_limits<Float>::min(). Those differ: the latter is f32::MIN_POSITIVE. Both guards were dead, leaving a zero thickness to divide by. - FilmBase::create expanded pixel_bounds by the filter radius. pbrt never does; the radius widens SampleBounds() only. Output was 1372x1030, not 1368x1026. - Gate the ENQUEUE/DEQUEUE wavefront prints behind cpu_debug; their queues reset every depth/batch/sample so they fired constantly (100h renders). |
||
|---|---|---|
| crates/ptex-filter | ||
| data | ||
| kernels | ||
| shared | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
PBRusT
Description
A Rust implementation of the physically based renderer described in the tremendous book Physically Based Rendering: From Theory to Implementation by Matt Pharr, Wenzel Jakob, and Greg Humphreys. This project aims to explore modern Rust features, and create a performant and stable rendering engine.
This implementation is currently under development and serves as a learning exercise for both advanced rendering techniques and Rust programming.
Getting Started
This project requires the Rust nightly toolchain
To install the nightly toolchain:
rustup toolchain install nightly
rustup default nightly
To get a local copy up and running:
-
Clone the repository:
git clone <repository> cd pbrt -
Build the project:
cargo build -
Run test:
cargo test
Dependencies
This project relies on the following external crates:
- bitflags
- bumpalo
- num & num-traits
- once_cell
- rand
- thiserror
- TODO: Generate docs with cargo docs. There are a lot more crates.
Help
Good luck.
command to run if program contains helper info
Authors
Version History
License
This project is licensed under the [NAME HERE] License - see the LICENSE.md file for details