MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / luminance

Function luminance

tools/bloom-diff/src/main.rs:58–60  ·  view source on GitHub ↗
(rgb: [f32; 3])

Source from the content-addressed store, hash-verified

56}
57
58fn luminance(rgb: [f32; 3]) -> f32 {
59 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]
60}
61
62/// Load an RGB image as normalized linear f32 triples. We operate in
63/// gamma-encoded (sRGB byte) space rather than re-linearizing — the

Callers 2

compute_statsFunction · 0.85
window_luminance_statsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected