GeometryShaderGen: Reimplement how line direction is determined.

Previous implementation caused some lines to be extended in the wrong direction.