Created
August 9, 2019 02:24
-
-
Save mazelines/be1d72ac64bb29fba18d6b20b71964d2 to your computer and use it in GitHub Desktop.
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
| half4 GammaToLinear(in half4 col) | |
| { | |
| #if SPACE_LINEAR | |
| return half4(col.rgb * col.rgb, col.a); | |
| #else | |
| return col; | |
| #endif | |
| } | |
| half4 LinearToGamma(in half4 col) | |
| { | |
| #if SPACE_LINEAR | |
| return half4(sqrt(col.rgb), col.a); | |
| #else | |
| return col; | |
| #endif | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment