Created
August 7, 2017 08:53
-
-
Save tomaka/0ef19530fdbf6a1d30ebf9c0bcd0df72 to your computer and use it in GitHub Desktop.
Non-linear sRGB to linear sRGB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 srgb_to_linear(vec3 c) { | |
return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment