Use a less intrusive delta value

This commit is contained in:
vlj 2014-04-21 19:39:39 +02:00
parent 43df357cfb
commit d7e3976ef5
2 changed files with 4 additions and 4 deletions

View File

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

View File

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