aboutsummaryrefslogtreecommitdiff
path: root/src/texture/mod.rs
diff options
context:
space:
mode:
authorlamp2023-03-05 21:45:56 +0000
committerlamp2023-03-05 21:45:56 +0000
commit78ddaff5855bf8446adef9e18eb0d7b7ddcee52a (patch)
tree0d0e93cfa28751a2f96518eeb231cf715958e1fa /src/texture/mod.rs
init
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;
+}