I want to write Flat, Gouraud and Phong shadings in the same application.
I think it's a problem writing them in the same shader with "if" statements, because some of the variables are supposed to be uniform in flat while supposed to be varying in Phong.
If I write 3 different shaders, does it mean that I will have to bind them or remove them separately, whenever I want to switch the shading?
Can I write functions that all 3 shaders can use in GLSL? Where should they be written? in which files?