Created
February 28, 2014 00:15
-
-
Save ikrima/9262567 to your computer and use it in GitHub Desktop.
This file contains 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
half3 fromRGBM(half4 c) { | |
#ifdef MARMO_LINEAR | |
//RGB is pulled to linear space by sRGB sampling, alpha must be in linear space also before use | |
//BUG?? Shouldn't this be toLinearFast1(c.a)*51.5 | |
return c.rgb * toLinearFast1(c.a); | |
#else | |
//leave RGB*A in gamma space, gamma correction is disabled | |
return c.rgb * c.a; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment