From 6c3c0ffffee7cb469af4a38a7cffdf7f469ea00e Mon Sep 17 00:00:00 2001 From: Alexandre Marcireau Date: Wed, 21 Aug 2019 08:18:54 +0200 Subject: [PATCH] Cast int to float to use the log function --- source/delta_t_display.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/delta_t_display.hpp b/source/delta_t_display.hpp index 9390548..3a8329a 100644 --- a/source/delta_t_display.hpp +++ b/source/delta_t_display.hpp @@ -183,7 +183,7 @@ namespace chameleon { } fragment_shader.append(R""( void main() { - float exposure = clamp(slope * log(texture(sampler, uv).x) + intercept, 0.0, 1.0) * color_table_scale; + float exposure = clamp(slope * log(float(texture(sampler, uv).x)) + intercept, 0.0, 1.0) * color_table_scale; color = mix( color_table[int(exposure)], color_table[int(exposure) + 1],