So I have the following situation: I'm sharing a blinn shader accross many meshes. Some meshes have specular & normal maps, others do not.
I'd like to, without making the shader code too complicated, be able to specify a constant color instead of a texture, for the normal or specular maps. This is for example if a given mesh doesn't need one of those maps.
The way I imagine it, I would just pass a flat "grey" as the specular map, for instance, and the shader could just act as if a texture was passed in. Is this possible?
Ideally, I don't want to have an extra uniform for each mesh specifying whether or not the texture should be used.
Another alternative would be to actually create a grey texture on the fly, if this is the better way, please advise on the simplest way to do this.