
Originally Posted by
terrygillooly
Very excited to have 3.5.1 (I may possibly need a life?), but having problems with the feedback I get from sampling white (HLS=0,1,0).
If I use SampleColour(x,y), then test the resulting Luminance with ColourL(), I get a weird result (something like 0.003) when I should get 1.
Grargh!
Okay, there is a bug with sampling pure white - it divides the Luminance value by 255. All other colours should be fine - it special-cases pure white and pure black to avoid some math and in testing I missed pure white.
So... next update will have that bug solved. In the meantime if you're using sample colour and you get a luminance value of 1/255 you will need to check R G or B to see if they're 1 (in which case your L value should have been 1 as well).
I'm very sorry about that. The next point release will have that problem solved.
AndyRage's mantra for graphics engine code:
"Sure - how hard can it be?"