mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Fixed the piecewise function in linearToGamma to use <= instead of < when determining whether to use the linear part of the function.
This commit is contained in:
@@ -213,7 +213,7 @@ float Math::gammaToLinear(float c) const
|
||||
**/
|
||||
float Math::linearToGamma(float c) const
|
||||
{
|
||||
if (c < 0.0031308f)
|
||||
if (c <= 0.0031308f)
|
||||
return c * 12.92f;
|
||||
else
|
||||
return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f;
|
||||
|
||||
Reference in New Issue
Block a user