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
float _Tolerance; | |
float _Threshold; | |
// Color Space Conversions can be found here: | |
// http://www.poynton.com/PDFs/coloureq.pdf | |
// http://dougkerr.net/Pumpkin/articles/CIE_XYZ.pdf | |
// cn -> color normalization | |
float cnRGB2XYZ(float val) { | |
if(val > 0.04045) { | |
return pow((val + 0.055) / 1.055, 2.4); | |
} |