summaryrefslogtreecommitdiff
path: root/indra/llmath/v3color.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v3color.h')
-rw-r--r--indra/llmath/v3color.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index ac78197510..43a632408c 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -484,4 +484,13 @@ inline const LLColor3 srgbColor3(const LLColor3 &a) {
return srgbColor;
}
+inline const LLColor3 linearColor3(const LLColor3 &a) {
+ LLColor3 linearColor;
+ linearColor.mV[0] = sRGBtoLinear(a.mV[0]);
+ linearColor.mV[1] = sRGBtoLinear(a.mV[1]);
+ linearColor.mV[2] = sRGBtoLinear(a.mV[2]);
+
+ return linearColor;
+}
+
#endif