Small changes to optimize shaders by calling pglUseProgram less frequently. These make shaders 2-3x faster.