An open API service indexing awesome lists of open source software.

https://github.com/doubleailes/crust-render

A simple toy ray tracer
https://github.com/doubleailes/crust-render

cook-torrance disney-principled-brdf mis path-tracing ray-tracing ray-tracing-in-one-weekend rust

Last synced: about 1 year ago
JSON representation

A simple toy ray tracer

Awesome Lists containing this project

README

          

# Crust Render




A toy, high-quality path tracer written in safe, modern Rust โ€” inspired by PBRT, `Ray Tracing in One Weekend`, and Autodesk Standard Surface.
Completely in a vibe coding mood.

## ๐Ÿ“ธ Preview

![preview](./images/rgb.png)

---

## โœจ Features

- โœ… **Physically-Based Path Tracing**
- Supports diffuse, metal, glass, Blinn-Phong, Cook-Torrance
- ๐Ÿ” **Recursive Ray Scattering** with depth control
- ๐Ÿ’ก **Multiple Light Sources**
- Emissive materials
- Light sampling & MIS (Multiple Importance Sampling)
- โš™๏ธ **Material System**
- Trait-based, easy to extend
- Microfacet GGX BRDF with Fresnel and geometry terms
- ๐Ÿง  **Importance Sampling**
- Supports BRDF- and light-based sampling
- โšก **Adaptive Sampling**
- Early stop based on variance threshold
- ๐Ÿงช **Modular Design**
- Clean separation between renderer, integrator, materials, scene
- **Disney Principled Shader**
- A basic integration of the animation standard shader
- **Correlated Multi-Jittered (CMJ)**
- Use CMJ for camera and light rays

---

## ๐Ÿš€ Getting Started

### ๐Ÿ”ง Build and Run

```bash
cargo run --release -- --samples-per-pixel 200 --max-depth 50