In GLSL can I use the flat keyword to make non gradient colored faces

So I have some simple meshes that have different materials that only have a color component. Would this idea be a good thing to use or would you suggest that I try something else? and what about importing them will Assimp be compatible with this design?

Depends. In your system:

  1. Is each mesh assigned at most one material?
  2. Does each material have one color?
  3. Do you render each mesh with a separate draw call?

If yes+yes+yes, then no. I’d just pass the material color in as uniform data, as it is constant across all vertices/primitives in the mesh/draw call. The flat keyword drives interpolation of fragment shader inputs, and you don’t really need interpolation in this case.

If other, then tell us what your needs are.