lettier / 3d-game-shaders-for-beginners

🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
https://lettier.github.io/3d-game-shaders-for-beginners/index.html
17.35k stars 1.35k forks source link

sRGB Formula incorrect #21

Open julhe opened 3 years ago

julhe commented 3 years ago

Just want to point out that the formula for Linear sRGB to Gamma-Corrected sRGB is not pow(x, 2.2). This is a common miss conception, since the gamma curve/ sRGB EOTF has a linear toe point.

The actual formular is described here: http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html https://www.colour-science.org/posts/the-importance-of-terminology-and-srgb-uncertainty/ https://entropymine.com/imageworsener/srgbformula/