Add albedo to material visualization

This commit is contained in:
hal8174 2024-12-31 18:04:52 +01:00
parent 9195b48079
commit 829476c602
3 changed files with 43 additions and 15 deletions

View file

@ -101,3 +101,9 @@ impl Mul<Color> for Float {
Color::new(self * rhs.r, self * rhs.g, self * rhs.b)
}
}
impl std::iter::Sum for Color {
fn sum<I: Iterator<Item = Self>>(iter: I) -> Self {
iter.reduce(|a, b| a + b).unwrap_or(Color::black())
}
}