Optimization: Edit Mesh Overlay

In tests with edit_cage: performance jumped from 9.37ms to 9.17ms.
This commit is contained in:
Germano Cavalcante 2018-10-17 15:45:58 -03:00
parent 65ea9ec948
commit a2922f9840
Notes: blender-bot 2023-02-14 05:10:40 +01:00
Referenced by issue #57296, Blender 2.8 crash on startup on Linux
Referenced by issue #57288, Assert when deleting duplicated collection (id->us == 0)
1 changed files with 1 additions and 4 deletions

View File

@ -86,12 +86,11 @@ void doVertexOfs(int v, vec2 fixvec)
void mask_edge_flag(int v, ivec3 eflag)
{
int vbe = (v + 2) % 3;
int vaf = (v + 1) % 3;
/* Only shade the edge that we are currently drawing.
* (fix corner bleeding) */
flag[vbe] |= (EDGE_EXISTS & eflag[vbe]);
flag = eflag;
flag[vaf] &= ~EDGE_EXISTS;
flag[v] &= ~EDGE_EXISTS;
}
@ -167,8 +166,6 @@ void main()
/* Remember that we are assuming the last vertex
* of a triangle is the provoking vertex (decide what flat attribs are). */
flag = eflag;
if ((eflag[2] & EDGE_EXISTS) != 0) {
/* Do 0 -> 1 edge strip */
faceColor = vec4(fcol.rgb, 0.0);