You are currently viewing the GMLscripts.com static mirror. Forum access and script submissions are not available through this mirror.

Invert GMLscripts.com

gammacorrect

This function is used to compensate for the nonlinearity of CRT display systems. If t varies over the [0,1] interval, then the result is also in that interval. The zero and one endpoints are mapped onto themselves. Other values are shifted upward toward one if gamma is greater than one, and shifted downward toward zero if gamma is between zero and one.

gamma correct

gammacorrect(gamma,x);
Returns the given value with gamma correction applied to it.
COPY/// gammacorrect(gamma,x);
//
//  Returns the given value with gamma correction applied to it.
//
//      gamma       correction value, real
//      x           value, real
//
//  If x varies over the [0,1] interval, then the result also
//  varies over that interval. The 0 and 1 endpoints of the 
//  interval are mapped onto themselves. Other values are 
//  shifted upward toward 1 if gamma is greater than 1 and 
//  shifted downward toward 0 if gamma is less than 1.
//
/// GMLscripts.com/license
{
    return power(argument1, 1 / argument0);
}

Contributors: xot

GitHub: View · Commits · Blame · Raw