summaryrefslogtreecommitdiff
path: root/indra/llmath/v4math.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v4math.h')
-rw-r--r--indra/llmath/v4math.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h
index 3f6d480ed9..00baeefa5c 100644
--- a/indra/llmath/v4math.h
+++ b/indra/llmath/v4math.h
@@ -534,6 +534,18 @@ inline F32 LLVector4::normVec(void)
return (mag);
}
+// Because apparently some parts of the viewer use this for color info.
+inline const LLVector4 srgbVector4(const LLVector4 &a) {
+ LLVector4 srgbColor;
+
+ srgbColor.mV[0] = linearTosRGB(a.mV[0]);
+ srgbColor.mV[1] = linearTosRGB(a.mV[1]);
+ srgbColor.mV[2] = linearTosRGB(a.mV[2]);
+ srgbColor.mV[3] = a.mV[3];
+
+ return srgbColor;
+}
+
#endif