aboutsummaryrefslogtreecommitdiff
path: root/src/material/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/material/mod.rs')
-rw-r--r--src/material/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/material/mod.rs b/src/material/mod.rs
new file mode 100644
index 0000000..62cbf9a
--- /dev/null
+++ b/src/material/mod.rs
@@ -0,0 +1,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)>;
+}