Add albedo to material visualization
This commit is contained in:
parent
9195b48079
commit
829476c602
3 changed files with 43 additions and 15 deletions
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue