[Bf-committers] Color to greyscale conversion - confusion
Campbell Barton
ideasman42 at gmail.com
Fri Jun 22 19:34:18 CEST 2012
Does anyone know why there are 2 different color -> grey-scale
conversions in blenders code?
float rgb_to_bw(const float rgb[3])
{
return 0.35f * rgb[0] + 0.45f * rgb[1] + 0.2f * rgb[2];
}
float rgb_to_grayscale(const float rgb[3])
{
return 0.3f * rgb[0] + 0.58f * rgb[1] + 0.12f * rgb[2];
}
>From reading the code its not clear why one of these are used over another.
also - are there names for these methods?
See uses: http://pastie.org/4133481
--
- Campbell
More information about the Bf-committers
mailing list