blob: c939385bd80b2bb28bab3b029e6e2eb1f5e708ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
use crate::core::{Ray, Intersection, Spectrum};
use crate::sample::Sampler;
mod lambertian;
mod reflectant;
pub use lambertian::Lambertian;
pub use reflectant::Reflectant;
pub trait Material {
fn scatter(&self, ray: &Ray, i: &Intersection, sampler: &mut dyn Sampler) -> Option<(Spectrum, Ray)>;
}
|