Fix: Overlay-Next: Loose edges is drawn with less intensity when selected

This was caused by the fresnel effect darkening the selection
color when there was no normal attribute available.
Now default to no darkening when no attribute is available.
This commit is contained in:
Clément Foucault
2024-11-20 18:25:54 +01:00
parent 46773766a3
commit 29356e2bf7

View File

@@ -95,7 +95,9 @@ void main()
/* Noop */
#else
bool no_attr = all(equal(nor, vec3(0)));
vec3 wnor = no_attr ? drw_view.viewinv[2].xyz : normalize(normal_object_to_world(nor));
/* If no attribute is available, use a direction perpendicular
* to the view to have full brightness. */
vec3 wnor = no_attr ? drw_view.viewinv[1].xyz : normalize(normal_object_to_world(nor));
if (isHair) {
mat4 obmat = hairDupliMatrix;