Approximates linear_to_srgb by taking the square root of each channel, a gamma of 2.0 instead of the sRGB curve (the inverse of srgb_to_linear_pow2). A negative channel gives NaN.
#import "Math";
assert(linear_to_srgb_sqrt(xyz(0.25, 1, 0)) == xyz(0.5, 1, 0));linear_to_srgb_sqrt :: (c: Vector3) -> Vector3
Approximates linear_to_srgb by taking the square root of each channel, a gamma of 2.0 instead of the sRGB curve (the inverse of srgb_to_linear_pow2). A negative channel gives NaN.
Parameters
- c: Vector3
Returns
#import "Math";
assert(linear_to_srgb_sqrt(xyz(0.25, 1, 0)) == xyz(0.5, 1, 0));linear_to_srgb_sqrt :: (c: Vector4) -> Vector4
The Vector4 form takes the square root of the red, green and blue channels and leaves alpha (w) untouched.
Parameters
- c: Vector4