aboutsummaryrefslogtreecommitdiff
path: root/src/material/mod.rs
blob: 62cbf9aa0f87276477b5a5a40331ab3e88dcec11 (plain)
1
2
3
4
5
6
7
8
9
10
use crate::core::{Ray, Intersection, Spectrum};
use crate::sample::Sampler;

mod lambertian;

pub use lambertian::Lambertian;

pub trait Material {
    fn scatter(&self, ray: &Ray, i: &Intersection, sampler: &mut dyn Sampler) -> Option<(Spectrum, Ray)>;
}