I'm currently learning OpenGL and it's become obvious that I can do most calculations on the CPU or the GPU. For example, I can do something like lightColor * objectColor on the CPU, then send it to the GPU via a GLSL uniform. On the contrary, I can send them separately and have GLSL perform the calculation.
Is there a best practice on where graphic calculations should be performed? My thoughts are that the GPU might be optimized for matrix or vector calculations. However, I'm also thinking that the CPU might be a better place for it since the GPU might have better things to do.