hi.
I have a for eg. icosphere and I’d like to highlight one of its triangles I’m pointing at with the camera’s front vector. I was able to calculate which triangle is the target I’m pointing at. The question is, that how can I change only those three vertices’ color? I’m doing the rendering instanced, so I send the mesh’s vertex positions in a VBO and the individual objects’ transformation matrices in instanced VBOs.
- If I send the the colors in a simple VBO, it belongs to all the objects because of instance rendering.
- If I send the the colors in an instanced VBO, then in the vertex shader I’ll have all colors for all vertices, but the problem is that now how can I decide which is the current vertex…
So, what is the common way to change particular vertices’ color on a single object when I’m instanced rendering everything?