use crate::{texture::Texture, vec3::Vec3}; #[derive(Debug, PartialEq)] pub struct ConstantTexture { color: Vec3, } impl ConstantTexture { pub fn new(color: V) -> ConstantTexture where V: Into, { ConstantTexture { color: color.into(), } } } impl Texture for ConstantTexture { fn value(&self, _u: f32, _v: f32, _p: Vec3) -> Vec3 { self.color } }