Found the problem:
Line 50 in fragment.glsl originally reads:
Code:
if (rgb.x = max_val)
When it should be:
Code:
if (rgb.x >= max_val)
And that's it! I can move forward with ClanLib now.
Thanks for all the help