hud_elements: remove unused LinearToSRGB

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
pull/941/head
Emil Velikov 1 year ago committed by jackun
parent f1a86fe10f
commit eecf901aed

@ -35,14 +35,6 @@ float SRGBToLinear(float in)
return powf((in + 0.055f) / 1.055f, 2.4f);
}
float LinearToSRGB(float in)
{
if (in <= 0.0031308f)
return in * 12.92f;
else
return 1.055f * powf(in, 1.0f / 2.4f) - 0.055f;
}
ImVec4 SRGBToLinear(ImVec4 col)
{
col.x = SRGBToLinear(col.x);
@ -53,16 +45,6 @@ ImVec4 SRGBToLinear(ImVec4 col)
return col;
}
ImVec4 LinearToSRGB(ImVec4 col)
{
col.x = LinearToSRGB(col.x);
col.y = LinearToSRGB(col.y);
col.z = LinearToSRGB(col.z);
// Alpha component is already linear
return col;
}
template<typename T, typename R = float>
R format_units(T value, const char*& unit)
{

Loading…
Cancel
Save