From 78ddaff5855bf8446adef9e18eb0d7b7ddcee52a Mon Sep 17 00:00:00 2001 From: lamp Date: Sun, 5 Mar 2023 21:45:56 +0000 Subject: init --- src/texture/mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/texture/mod.rs (limited to 'src/texture/mod.rs') 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; +} -- cgit v1.2.3