A line whose end lies behind the eye has no screen point: vs_line divided by a non-positive w, which flipped the segment or dropped it whole. At a low perspective angle the grid lines running along the view direction reach behind the camera and vanished. Cut each segment at clip z = 0 before the screen-space expansion. Fixes #182 Co-authored-by: Vitali M. <[email protected]>