Thursday, March 02, 2006

Gamma, bias and gain

gamma:


float gamma(float val, gam){
return pow(val, 1 / gam);
}

bias:


float bias (float x, val){
return (val > 0) ? pow(x,log(val) / log(0.5)) : 0;
}


gain:


float gain (float x, val ) {
return 0.5 * ((x < 0.5) ? bias (2*x, 1-val): (2 - bias(2-2*x,1-val)));
}


Link: rendermanacademy

1 comment:

anY said...

这个资料帮助了我,谢谢