You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I come up with a function that aproximates the gamma conversion is has a RMSE of 0.001064 which is better than the simple x^2 aproach here is the math: https://www.desmos.com/calculator/rbjqw6re8i
pub inline fn linearAprox(val: F32x4) F32x4 {
var a = val * val;
var b = a * @sqrt(val);
b = f32x4s(0.567) * a + f32x4s(1 - 0.567) * b;
return @shuffle(f32, b, val, [4]i32{ 0, 1, 2, ~@as(i32, 3) });
}
The text was updated successfully, but these errors were encountered:
I'm getting results that don't quite seem consistent with a RMSE of 0.001064, although that may be because I've happened to pick particularly large error test cases. PR/tests in #459, wasn't sure where to put it (would be an equivalent to function provided in stb_image), so just stuck it in zmath for now.
Hi,
I come up with a function that aproximates the gamma conversion is has a RMSE of 0.001064 which is better than the simple x^2 aproach here is the math: https://www.desmos.com/calculator/rbjqw6re8i
The text was updated successfully, but these errors were encountered: