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