Solstrale
A WGPU-based GPU Monte Carlo path tracing library, with features like:
Core Engine
- Global illumination
- Caustics
- Reflection
- Refraction
- Soft shadows
- Bump mapping
- Light attenuation
Performance & Loading
- Loading of obj models with included materials
- Multithreaded BVH creation using Rayon to greatly speed up rendering
Post-Processing
Custom GPU-accelerated filters implemented as compute shaders via WGPU:
- Bloom filter
- Saturation filter
Installation
To build the library, ensure you have Rust installed and run:
Usage
Running Tests
To run the project's test suite:
Library Example
Add solstrale to your Cargo.toml. Below is a basic example of how to set up a scene and start rendering:
use channel;
use thread;
use CameraConfig;
use Vec3;
use ;
use Lambertian;
use SolidColor;
use ray_trace;
use ;
use get_wgpu_device_and_queue;
Example output
Credits
The ray tracing is inspired by the excellent Ray Tracing in One Weekend Book Series by Peter Shirley