Template Function TRAP::Math::ConvertLinearToSRGB(const Vec<L, T>&, T)#
Function Documentation#
-
template<u32 L, typename T>
constexpr Vec<L, T> TRAP::Math::ConvertLinearToSRGB(const Vec<L, T> &colorLinear, T gamma)# Convert a linear color to sRGB color using a custom gamma correction. IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb.
- Parameters:
colorLinear – Color in linear space.
gamma – Gamma correction value to use. Typically 0.41666 is used.
- Returns:
Color in sRGB space.