POV-Ray : Newsgroups : povray.general : Bug or Clarification: Gamma Correction : Re: Bug or Clarification: Gamma Correction Server Time
12 Aug 2024 07:27:41 EDT (-0400)
  Re: Bug or Clarification: Gamma Correction  
From: John M  Dlugosz
Date: 10 Mar 1999 19:19:09
Message: <36e70bfd.0@news.povray.org>
OK, as I read the code, it's sending out multiple rays for one pixel,
summing as it goes.  The, it divides by the number of samples, producing the
average which is the actual result.

It does gamma correction before summing.
I would think it should do gamma correction after dividing.

I've not thought about the meaning of post-corrected pixels above and left
of the current pixel and its role in adaptive supersampling.  But that might
be part of the reason for this code.

Just do a search on "gamma".  You'll find something like 6 hits in a .C
file, including the
function which does it, and three places where it's called as part of a
supersampling process.

--John



Bob Hughes wrote in message <36E6E739.D8B637EB@aol.com>...
>Huh? ;)
>
>This kind of thing is what I have trouble with. It's simply a two way
>street it seems and they always seem to turn out to be one way streets.
>Metaphoricly typing of course...
>
>I think I understand your meaning here, that the gamma is getting done
>per processed pixel and yet the following pixels are not done so until
>after they are sampled along with the previous pixels, right? Maybe not
>right?
>Anyway, I am thoroughly confused now.
>
>
>"John M. Dlugosz" wrote:
>>
>> Isn't manipulation of pixels supposed to be done on a linear scale, i.e.
>> =before= gamma correction for the monitor?  The comments in the source
even
>> say "this is done exactly once per pixel displayed/saved".  But the
>> supersampling gamma corrects each value individually before averaging
them
>> together.  I'm confused as to the meaning here.
>>
>> From the docs, it's clear that the intent is for all new scenes to have
>> "assumed gamma" of 1 ("strongly recomended" it explains, "since that's
the
>> way light works in the real world", and this is adjusted for the display
>> gamma when it is output.
>>
>> So shouldn't all manipulation be done on the computed values (in the
>> assumed_gamma), and then the final pixel value be adjusted once?  Doing
the
>> gamma correction first will give different results for different display
>> gamma values, which is exactly what the docs say is =not= supposed to
>> happen.
>>
>> --John
>
>--
> omniVERSE: beyond the universe
>  http://members.aol.com/inversez/POVring.htm
> mailto:inv### [at] aolcom?PoV


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.