Template Function TRAP::Math::ConvertLinearToSRGB(const Vec<L, T>&)#

Function Documentation#

template<u32 L, typename T>
constexpr Vec<L, T> TRAP::Math::ConvertLinearToSRGB(const Vec<L, T> &colorLinear)#

Convert a linear color to sRGB color using a standard gamma correction. IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb.

Parameters:

colorLinear – Color in linear space.

Returns:

Color in sRGB space.