Optimization: Edit Mesh Overlay
In tests with edit_cage: performance jumped from 9.37ms to 9.17ms.
This commit is contained in:
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)
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue