Trying to figure out what the best way would be to go about this. Say I have a model with 100s of vertices and I need to have the faces that are composed of 9 of those vertices to have a partially transparent color applied on top of the texture already used by those vertices. A good example of this would be something like a grid based tactics game where to denote your movable area, a transparent overlay is placed on top of areas in the map:
My initial thought was to pass a buffer of vertices to the vertex shader and check each vertice to see if it is in the buffer and if so then pass a flag to the fragment shader which could then mix the appropriate color with the existing texture. But this seems like it would be quite inefficient as there would need to be looping logic which checked EVERY vertex to see if it was in the buffer or not…what are your thoughts on this?
Another option might be to use framebuffers. The initial scene could be held in a framebuffer, then another buffer could be generated using only the vertices of the faces to highlight giving them a color with an alpha, then blending the two buffers together…maybe?
Do either of these options seem feasible or is there another option that would make more sense? (As you've probably gathered by now I'm fairly new to graphics development so any advice is really appreciated).