Linear Space Space gamma correction gamma - simply understand

How gamma correction to produce?

  Ancient times CRT monitor, the input and output color inconsistency, such as input 0.5, 0.218 output, relationship: output = input power of 2.2

  This is a power of 2.2 gamma value. To ensure the expected results, you want to output 0.5, that input is 1 / 2.2 power of 0.5, which is gamma correction, on the

  Apparatus in order to solve the problem, according to the formula, using the idea to do the reverse process, called gamma correction

Basically the LCD screen, and why gamma correction also live moisture?

  Because the human eye like the human eye is more sensitive to dark, bright less sensitive, for example, (a byte is stored luminance value, the range is 0-255)

  Now we have to store two luminance 0.243 and 0.24, the linear 61.2,0.243 = 0.24 * 255 * 255 = 61.965, integers 0-255

  Range represents the 61, details the difference is lost.

  If, after the gamma correction, the two results were 0 . 2 4 ( 1 / 2 .2 power) * 2 . 5 . 5 1 . 3 . 3 . 3,0 . 2 43 is ( 1 / 2 .2 power) * 2 . 5 . 5 . 1 34.1, so

  Their differences on the details of the reservation

  It is because gamma correction increases the accuracy of the dark part of the value, reducing the accuracy of the values ​​of the bright portion, exactly in line with the human eye is sensitive to light and dark features, so

  Visually, the image quality is improved gamma correction amazing! ! Because of this, the gamma is still alive and well!

Map frequently used, why the photo is non-linear gamma map

  As we mentioned above reason, in FIG nonlinear gamma space, the human eye is relatively richer details of the performance, under the same encoding precision, will

  There are more details of the performance, so the photo now, the basic texture or gamma nonlinear map

Gamma space VS linear space?

  Shown below, is a gamma mapping workflow space, under normal circumstances, the gamma space for the lighting calculations is not true color

  Texture, is saved for 1 / 2.2 power maps, maps with such errors involved in lighting calculations, lighting result is not correct,

  Therefore, the resulting effect is not a true rendering natural renderings.

  If a linear space, if the Texture is linear, then when the lighting calculations, direct use; FIG if nonlinear, to

  Results for Gamma correction to the correction Color is true, then re-lighting calculations. Finally, a 1 / 2.2 power of operation,

  The final screen to offset a 2.2 Gamma Correction.

  The following is a comparison of the rendering process at the Gamma and Linear Space Space:

 Gamma space (on) VS Linear Space (under)

 New doubt flow in Linear space, Gamma manual processing in the shader, you can also ah, why Linear space? ? ? ?

  In fact, for the above Gamma rendering process, we deal with do twice (1 / 2.2,2.2) in the shader, can really achieve the same effect under Linear space,

  However, Linear mode requires hardware support, hardware support is high 1 / 2.2 and the processing power of 2.2, so that more hardware rendering efficiency of the process,

  The two main support of the linear space: sRGB Frame Buffer and sRGB Sampler, sRGB Frame Buffer is doing 1 / 2.2 operating hardware level,

  sRGB Sampler 2.2 operate the hardware level. So is the original linear mapping, the hook is in the sRGB uniyt set, nonlinear hook to sRGB.

Select Gamma linear space and space?

  Linear Space requirements for natural light rendering results, especially in the PBR, its hardware requirements OpenGL 3.0; can be used in cases where a space Gamma

Misunderstanding! !

  Gamma is a flow space, as shown in FIG one; the sRGB is selected on a map accuracy, with nothing to Gamma space Strictly speaking, Linear space are in use.

References:

https://blog.csdn.net/u011618339/article/details/80842486

https://www.cnblogs.com/guanzz/p/7416821.html

Guess you like

Origin www.cnblogs.com/hiker-online/p/12501027.html