co-authored by
Claude Opus 5.5
parent
6c799f3c3b
commit
91ee7bf1b3
@@ -386,7 +386,13 @@ type RankPlanes<'a> = [(&'a [f32], &'a [f32])];
|
||||
/// ranks (the Cryptomatte spec's matte), clamped to 0..1.
|
||||
#[inline]
|
||||
fn crypto_matte(planes: &RankPlanes, sel: &[u32], i: usize) -> f32 {
|
||||
planes.iter().filter_map(|(id, c)| Some((*id.get(i)?, *c.get(i)?))).filter(|(id, c)| *c > 0.0 && sel.contains(&id.to_bits())).map(|(_, c)| c).sum::<f32>().clamp(0.0, 1.0)
|
||||
planes
|
||||
.iter()
|
||||
.filter_map(|(id, c)| Some((*id.get(i)?, *c.get(i)?)))
|
||||
.filter(|(id, c)| *c > 0.0 && sel.contains(&id.to_bits()))
|
||||
.map(|(_, c)| c)
|
||||
.sum::<f32>()
|
||||
.clamp(0.0, 1.0)
|
||||
}
|
||||
|
||||
/// The coverage-weighted ID colours at aux pixel `i` (the spec's preview).
|
||||
|
||||
Reference in New Issue
Block a user