glsl try use 'mix' (in place of 'if')