Overlay: Fix vertex discard issue on Nvidia hardware
Instead of relying on undefined behavior to discard the line, we put the vertex at the camera origin so that interpolation does not produce any fragment. We don't use FLT_MAX as it also gives unpredicatble results on NVidia.
This commit is contained in:
@@ -104,8 +104,8 @@ void main()
|
||||
gl_Position = point_world_to_ndc(wpos);
|
||||
|
||||
if (get_edge_sharpness(wd) < 0.0) {
|
||||
/* Discard primitive. */
|
||||
gl_Position = vec4(0.0);
|
||||
/* Discard primitive by placing any of the verts at the camera origin. */
|
||||
gl_Position = vec4(0.0, 0.0, -3e36, 0.0);
|
||||
}
|
||||
|
||||
#ifndef SELECT_EDGES
|
||||
|
||||
Reference in New Issue
Block a user