aboutsummaryrefslogtreecommitdiff
path: root/src/texture/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/texture/mod.rs')
-rw-r--r--src/texture/mod.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/texture/mod.rs b/src/texture/mod.rs
new file mode 100644
index 0000000..55bc9cf
--- /dev/null
+++ b/src/texture/mod.rs
@@ -0,0 +1,15 @@
+mod perlin;
+mod solid_color;
+pub use solid_color::SolidColor;
+mod checker_texture;
+pub use checker_texture::CheckerTexture;
+mod noise_texture;
+pub use noise_texture::NoiseTexture;
+mod image_texture;
+pub use image_texture::ImageTexture;
+
+use crate::{vec3::Color, vec3::Point3};
+
+pub trait Texture: Send + Sync {
+ fn value(&self, u: f64, v: f64, p: &Point3) -> Color;
+}