This is work in progress. Look is not final. This align data VBO data structure used for edti cage drawing to the one use for normal drawing. We no longer use barycentric coords to draw the lines an just rasterize line primitives for edge drawing. This is a bit slower than using the previous fast method but faster than the "correct" (edge artifact free) method. This also make the code way simpler. This also makes it possible to reuse possible and normal vbos used for shading if the edit cage matches the This also touches the UV batch code to share as much render data as possible. The code also prepare for edit cage "modified" drawing cage (with modifier applied) but is not enabled since selection and operators does not work with modified cage yet.
20 lines
282 B
GLSL
20 lines
282 B
GLSL
|
|
flat in int vertFlag;
|
|
|
|
out vec4 FragColor;
|
|
|
|
void main()
|
|
{
|
|
/* TODO: vertex size */
|
|
|
|
if ((vertFlag & VERT_SELECTED) != 0) {
|
|
FragColor = colorVertexSelect;
|
|
}
|
|
else if ((vertFlag & VERT_ACTIVE) != 0) {
|
|
FragColor = colorEditMeshActive;
|
|
}
|
|
else {
|
|
FragColor = colorVertex;
|
|
}
|
|
}
|