I have vertices and triangles data that contain color for each triangle (face), and not for each vertex. those. one vertex is shared by several faces, each of which has a potentially different color.
How do I approach this issue in GLSL to get a clear color assignment for each face displayed? Calculating and assigning a vertex color buffer by averaging the colors of neighboring vertex policies is quite simple, but this, of course, creates a blurry result where the colors are interpolated in the fragment shader.
What I really need does not have to be interpolated color values at all, I will have about 40k triangles obscured by about 15 possible solid colors as soon as it works as intended.
source
share