diff options
author | lamp | 2023-03-05 21:45:56 +0000 |
---|---|---|
committer | lamp | 2023-03-05 21:45:56 +0000 |
commit | 78ddaff5855bf8446adef9e18eb0d7b7ddcee52a (patch) | |
tree | 0d0e93cfa28751a2f96518eeb231cf715958e1fa /src/texture/mod.rs |
init
Diffstat (limited to 'src/texture/mod.rs')
-rw-r--r-- | src/texture/mod.rs | 15 |
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; +} |