Overlay: Edit Mesh: Add offset for thicker edges

Edges with sharpness, seam and bevel are thicker and thus needs more offset
to not appear aliased.

Based on D5448 by @oficsu
This commit is contained in:
Clément Foucault 2020-03-29 20:42:52 +02:00
parent 0b57ecc665
commit bf3b0db785
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,10 @@ void main()
float bweight = float(m_data.w) / 255.0;
finalColorOuter = EDIT_MESH_edge_color_outer(m_data.y, m_data.x, crease, bweight);
if (finalColorOuter.a > 0.0) {
gl_Position.z -= 5e-7 * abs(gl_Position.w);
}
bool occluded = false; /* Done in fragment shader */
#elif defined(FACE)