Fix T61374 : vertex not visible/selectable if it is at objects origin

It was caused by Null normal if the vertex is at origin. Just add a small
bias to avoid this case.
This commit is contained in:
Clément Foucault 2019-02-11 14:37:19 +01:00
parent 1a8cd3a8a7
commit d07cde8de8
Notes: blender-bot 2023-02-14 07:36:17 +01:00
Referenced by issue #61374, vertex not visible/selectable if it is at objects origin
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ void main()
#if !defined(FACE) && !defined(EDGE_DECORATION)
/* Facing based color blend */
vec4 vpos = ModelViewMatrix * vec4(pos, 1.0);
vec3 view_normal = normalize(NormalMatrix * vnor);
vec3 view_normal = normalize(NormalMatrix * vnor + 1e-4);
vec3 view_vec = (ProjectionMatrix[3][3] == 0.0)
? normalize(vpos.xyz)
: vec3(0.0, 0.0, 1.0);