(color: Vec3)
| 1898 | // ============================================================ |
| 1899 | |
| 1900 | fn 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 | |
| 1910 | fn linear_to_srgb(c: f32) -> f32 { |
| 1911 | if c <= 0.0031308 { |