Available since LÖVE 0.10.0
This function is not supported in earlier versions.
Gets whether gamma-correct rendering is supported and enabled. It can be enabled by setting
t.gammacorrect = true in love.conf.
Not all devices support gamma-correct rendering, in which case it will be automatically disabled and this function will return false. It is supported on desktop systems which have graphics cards that are capable of using OpenGL 3 / DirectX 10, and iOS devices that can use OpenGL ES 3.
gammacorrect = love.graphics.isGammaCorrect( )
When gamma-correct rendering is enabled, many functions and objects perform automatic color conversion between sRGB and linear RGB in order for blending and shader math to be mathematically correct (which they aren't if it's not enabled.)
linear = trueis set when creating the Image.
Because most conversions are automatically handled, your own code doesn't need to worry about sRGB and linear RGB color conversions when gamma-correct rendering is enabled, except in a couple cases:
In both cases, love.math.gammaToLinear can be used to convert color values to linear RGB in Lua code, or the
unGammaCorrectColor if necessary) shader functions can be used inside shader code. Those shader functions only do conversions if gamma-correct rendering is actually enabled. The
LOVE_GAMMA_CORRECT shader preprocessor define will be set if so.
Read more about gamma-correct rendering here, here, and here.
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.