Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this a bug in code?
06-05-2011, 07:48 AM,
#13
 
NaN Wrote:Looks like gamma correction: http://en.wikipedia.org/wiki/Gamma_correction

I guess the code is meant to be:
Code:
            srgb_alpha[0] = r < 1 ? pow(r, 2.2f) : r;
            srgb_alpha[1] = g < 1 ? pow(g, 2.2f) : g;
            srgb_alpha[2] = b < 1 ? pow(b, 2.2f) : b;
            srgb_alpha[3] = a;

But Joe can tell more I think.

OK. I could understand ganmma correction but not the code. What you've written is understandable but not the other. Thanks Smile
Reply


Messages In This Thread
Is this a bug in code? - by antoniovazquez - 06-03-2011, 07:40 AM
[No subject] - by NaN - 06-03-2011, 05:08 PM
[No subject] - by antoniovazquez - 06-03-2011, 05:18 PM
[No subject] - by antoniovazquez - 06-03-2011, 05:41 PM
[No subject] - by NaN - 06-03-2011, 05:47 PM
[No subject] - by antoniovazquez - 06-03-2011, 05:51 PM
[No subject] - by NaN - 06-03-2011, 05:59 PM
[No subject] - by antoniovazquez - 06-03-2011, 06:04 PM
[No subject] - by NaN - 06-03-2011, 06:15 PM
[No subject] - by antoniovazquez - 06-03-2011, 06:27 PM
Re: Is this a bug in code? - by antoniovazquez - 06-05-2011, 06:37 AM
[No subject] - by NaN - 06-05-2011, 07:22 AM
[No subject] - by antoniovazquez - 06-05-2011, 07:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)