Python-inspired reformat of a small c++ shader

Several performance problems became a lot easier to see, though so far I haven't noticed any really huge slowdowns.