From b8d5719a827507b2ff4e24d9b68142deb7ddfcad Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Mon, 21 Apr 2014 22:37:26 +0200 Subject: [PATCH] Fix a typo in tonemap.frag Also tweak whitepoint and exposure. They should be manually set by track somehow. --- data/shaders/tonemap.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/shaders/tonemap.frag b/data/shaders/tonemap.frag index 9718adcb5..b0b5b9b2e 100644 --- a/data/shaders/tonemap.frag +++ b/data/shaders/tonemap.frag @@ -10,7 +10,7 @@ vec3 getCIEYxy(vec3 rgbColor); vec3 getRGBFromCIEXxy(vec3 YxyColor); float exposure = .2; -float whitePoint = 1.; +float whitePoint = 10.; float delta = .0001; void main() @@ -21,7 +21,7 @@ void main() vec3 Yxy = getCIEYxy(col.xyz); float Lp = Yxy.r * exposure / avgLuminance; - Yxy.r = (Lp * (1. * Lp / (whitePoint * whitePoint))) / (1. + Lp); + Yxy.r = (Lp * (1. + Lp / (whitePoint * whitePoint))) / (1. + Lp); FragColor = vec4(getRGBFromCIEXxy(Yxy), 1.); }