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