From eecf901aed41e668161ef98b85431c808f29bbf4 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 3 Mar 2023 15:36:45 +0000 Subject: [PATCH] hud_elements: remove unused LinearToSRGB Signed-off-by: Emil Velikov --- src/hud_elements.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/hud_elements.cpp b/src/hud_elements.cpp index 3eda9cc9..faedde7d 100644 --- a/src/hud_elements.cpp +++ b/src/hud_elements.cpp @@ -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 R format_units(T value, const char*& unit) {