aboutsummaryrefslogtreecommitdiff
path: root/src/texture/mod.rs
blob: 55bc9cfaba8aa67ec67162bac33d23430ad17882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
}