RE: [Algorithms] Gamma correction an HDR images?
Brought to you by:
vexxed72
|
From: <c.s...@ph...> - 2005-06-01 21:39:14
|
Technically a HDR texture is a collection of numbers with enough = precision and range beyond the 0..1 range. Whether it is in gamma space or linear space, only the content creator = knows. Display cards for PC's have a history of outputting voltages that are = proportional to RGB values. Due to the fabric of the CRT circuitry the resultant light power gets in = effect raised to a power near 2. So greyscale 128 is about 1/4 the intensity of greyscale 255. You can veryfy this by comparing a checkerboard pattern with a solid = greyscale of 181, which corresponds to sqrt(1/2). They should be ~about~ equal. The gamma phenomenon introduces the convenience of allocating more = precision to the dark colors for precision limited 8-bit RGB. Since the darkest grey representable in 8 bit RGB is not 1/255, but = really it is ~ 1/65025, which would need 16-bit precision in linear = space. So gamma is also a form of compression. You will get ugly banding = if you try to output an 8-bit precision framebuffer "linearly". All our infrastructure today (Photoshop, digital cameras, scanners, etc) = evolved around exchange of information in gamma-space, so we have to = deal with it. The bit-exact gamma value is not so much important (is different from = device to device anyway) as it is more to remember is that gamma is in = the first order a power of 2, which also makes things easy to calculate. = Linear conversion before summing pixels is done by ^2 and re-gamma after = summing pixels is done by sqrt(). -----Original Message----- From: gda...@li... = [mailto:gda...@li...] On Behalf Of = Bra...@Pl... Sent: Wednesday, June 01, 2005 8:00 PM To: gda...@li... Subject: [Algorithms] Gamma correction an HDR images? So I'm continuing work on our texture pipeline, doing gamma corrected=20 (linear space) box filtering to generate mip maps, and everything is=20 grand. However, now there's the issue of HDR images, and whether or not = to gamma correct them before mip mapping. Now, I've always been under = the=20 impression that HDR images are already in linear space and don't need to = be gamma corrected. However, how does the graphics card "know" that it = is=20 in linear space? For example, is an HDR texture that only contains = pixels=20 in the range of 0.0 to 1.0 (an LDR texture that happens to have an HDR=20 pixel format) somehow treated differently than a regular LDR texture? I = feel like I'm overlooking some vital piece of information here. So, should I or should I not gamma-correct HDR images before mipping? Thanks, and sorry if I munged the terminology in posing the question. = My=20 understanding of linear vs. gamma space and related things is still=20 somewhat cursory. Brad... ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit = http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q22005 _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3D6188 |