This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
// Colorspace conversions, I haven't checked the validity of this stuff. | |
// Some of them cause discolorations when transformed to and back so I'm | |
// probably doing wrong things that I don't understand -- Caveat emptor. | |
// CIELab XYZ | |
// ---------- | |
// Matrices borrowed from Fundamentals Of Computer Graphics (3rd edition). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 330 | |
// Tonemapping | |
// ----------- | |
// Some of these are attributed to certain games. | |
// But this is mostly secondhand info, so take it with a grain of salt. | |
vec3 Tonemap_Reinhard(vec3 x) { | |
// Simplest Reinhard tonemapper. |
NewerOlder