added option for global or constant lookup tables (constant is faster in
NVidia, but makes no difference on AMD/ATI)