lib8: implement layer blending

This commit is contained in:
2024-10-30 21:54:27 +01:00
parent 6fc4cb224f
commit 18287783d4
2 changed files with 11 additions and 1 deletions

View File

@ -103,7 +103,7 @@ impl<T: LedPixelShape, S: Surface> Display<S> for EmbeddedDisplay<Ws2812DrawTarg
let mut pixel = RGB8::new(0, 0, 0);
for surface in self.surfaces.iter() {
surface.with_shader(|shader| {
pixel = shader.draw(virtCoords.clone());
pixel = pixel.saturating_add(shader.draw(virtCoords.clone()));
})
}
self.total_mw += pixel.as_milliwatts();