Skip to content

Commit

Permalink
Cast int to float to use the log function
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarcireau committed Aug 21, 2019
1 parent dae8fc6 commit 6c3c0ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/delta_t_display.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 6c3c0ff

Please sign in to comment.