There's more...

You'll notice that the Luminance function we are using will return the dot product between the color passed in and a property called unity_ColorSpaceLuminance. To see what that is, you can use Find menu in your text editor (Ctrl + F) and type it in. After searching for it, you should be able to see the following on line 28:

#ifdef UNITY_COLORSPACE_GAMMA#define unity_ColorSpaceGrey fixed4(0.5, 0.5, 0.5, 0.5)#define unity_ColorSpaceDouble fixed4(2.0, 2.0, 2.0, 2.0)#define unity_ColorSpaceDielectricSpec half4(0.220916301, 0.220916301, 0.220916301, 1.0 - 0.220916301)#define unity_ColorSpaceLuminance half4(0.22, 0.707, 0.071, 0.0) // Legacy: alpha is set to 0.0 to specify gamma mode#else // Linear values#define unity_ColorSpaceGrey ...

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.