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

Function tonemap_aces

tools/bloom-reference/src/main.rs:1900–1908  ·  view source on GitHub ↗
(color: Vec3)

Source from the content-addressed store, hash-verified

1898// ============================================================
1899
1900fn tonemap_aces(color: Vec3) -> Vec3 {
1901 let a = 2.51;
1902 let b = 0.03;
1903 let c = 2.43;
1904 let d = 0.59;
1905 let e = 0.14;
1906 let mapped = (color * (color * a + b)) / (color * (color * c + d) + Vec3::splat(e));
1907 mapped.clamp(Vec3::ZERO, Vec3::ONE)
1908}
1909
1910fn linear_to_srgb(c: f32) -> f32 {
1911 if c <= 0.0031308 {

Callers 1

renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected