Revert "Revert "Use a less intrusive delta value""

This reverts commit 230076ffcbd05ecf8a05c165a95fec7823687c4a.
This commit is contained in:
vlj 2014-04-23 18:19:00 +02:00
parent 77795c796f
commit 19d2f1f9ac
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ uniform sampler2D tex;
in vec2 uv;
out vec4 FragColor;
float delta = .1;
float delta = .0001;
void main()
{

View File

@ -9,15 +9,15 @@ out vec4 FragColor;
vec3 getCIEYxy(vec3 rgbColor);
vec3 getRGBFromCIEXxy(vec3 YxyColor);
float exposure = .3;
float exposure = .2;
float whitePoint = 1.;
float delta = .1;
float delta = .0001;
void main()
{
vec4 col = texture(tex, uv);
float avgLuminance = textureLod(logluminancetex, uv, 10.).x;
avgLuminance = exp(avgLuminance) - delta;
avgLuminance = max(exp(avgLuminance) - delta, delta);
vec3 Yxy = getCIEYxy(col.xyz);
float Lp = Yxy.r * exposure / avgLuminance;