GPUShader: Fix wide line emulation with flat color interpolation.

This was causing flashing colors in the node editor grid.

This is because in some cases the flat color is only set on the provoking
vertex which is the last of the primitive by default.
This commit is contained in:
2020-09-18 22:41:33 +02:00
parent 649b0ccac8
commit ea72c5d69b

View File

@@ -26,7 +26,8 @@ void do_vertex(const int i, vec2 ofs)
finalColor = color;
#elif defined(FLAT)
finalColor = finalColor_g[0];
/* WATCH: Assuming last provoking vertex. */
finalColor = finalColor_g[1];
#elif defined(SMOOTH)
finalColor = finalColor_g[i];