use crate::vec3::Color; #[derive(Clone)] pub struct Pixel { pub color: Color, pub sample_count: u32, } impl Pixel { pub fn update(&mut self, color: Color) { self.color += color; self.sample_count += 1; } }