MCPcopy Create free account
hub / github.com/RenderKit/embree / srgba_to_linear

Function srgba_to_linear

tutorials/common/math/vec.h:75–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75inline Vec4f srgba_to_linear(const Vec4f c)
76{
77 return Vec4f(srgb_to_linear(c.x),
78 srgb_to_linear(c.y),
79 srgb_to_linear(c.z),
80 max(c.w, 0.f)); // alpha is never gamma-corrected
81}
82
83// TODO implement srgba8_to_linear with a 256 entry LUT
84

Callers 2

getTexel_SRGBAFunction · 0.85
getTexel_SRGBFunction · 0.85

Calls 2

srgb_to_linearFunction · 0.85
maxFunction · 0.50

Tested by

no test coverage detected