No description
Find a file
Wito Wiala 4faa3cdc95 Fix colorspace illuminant, LayeredBxDF transmittance, and film pixel bounds
- 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).
2026-09-02 21:20:38 +01:00
crates/ptex-filter Finished work on the shared side. Now moving to host code. May god have mercy on my soul 2026-05-19 19:58:21 +01:00
data Very big change, preparing for gpu integration 2025-12-20 00:11:31 +00:00
kernels Still broken 2026-06-02 21:46:11 +01:00
shared Fix colorspace illuminant, LayeredBxDF transmittance, and film pixel bounds 2026-09-02 21:20:38 +01:00
src Fix colorspace illuminant, LayeredBxDF transmittance, and film pixel bounds 2026-09-02 21:20:38 +01:00
.gitignore Moving to index based access of resources and instances 2026-08-31 13:10:53 +01:00
build.rs Finally fixed import errors due to refactoring, gotta get a better IDE 2026-01-19 23:52:12 +00:00
Cargo.toml Correcting some mistakes I had regarding error handling, enabling optimization on builds, added option handling to BasicSceneBuilder 2026-09-01 18:00:33 +01:00
README.md Continuing with the cleanup 2026-02-15 14:48:50 +00:00
rust-toolchain.toml Big slog, separating GPU and CPU safe structs and constructors 2025-12-21 02:17:28 +00:00

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:

  1. Clone the repository:

    git clone <repository>
    cd pbrt
    
  2. Build the project:

    cargo build
    
  3. Run test:

    cargo test
    

Dependencies

This project relies on the following external 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

Acknowledgments