Eliminate branching in single-pass shaders.

This makes the legacy shaders compatible with the new LUT ordering.