| 90 | } |
| 91 | |
| 92 | float Luma(const Vector3& color) |
| 93 | { |
| 94 | constexpr auto RED_COEFF = 0.2126f; |
| 95 | constexpr auto GREEN_COEFF = 0.7152f; |
| 96 | constexpr auto BLUE_COEFF = 0.0722f; |
| 97 | |
| 98 | // Use Rec.709 trichromat formula to get perceptive luma value. |
| 99 | return float((color.x * RED_COEFF) + (color.y * GREEN_COEFF) + (color.z * BLUE_COEFF)); |
| 100 | } |
| 101 | |
| 102 | float Chroma(const Vector3& color) |
| 103 | { |
no outgoing calls
no test coverage detected