8 minutes ago, iedoc said:I'm not sure exactly what your doing in your geometry shader to get the final position, but it looks to me like your not taking the camera position into account. For the dot product, you should dot the normal of your segments with the camera-to-segment direction.
something like this maybe:
dot(segmentNormal, camPosition - segmentPosition) > 0) // reverse segment direction because segment is now facing away from camera
Trying not to sound dumb here, but doesn't transforming the WS position with the modelview matrix get me to view space, which is already camera-relative? If I then discard Z, then my coordinate should effectively be in screen space. Insofar as I follow the math, I'm transforming the WS end points to views space, then I project the spline directions at either endpoint to screen space and compute the 2D normals (right vectors)*, which are implicitly camera-aligned orthogonal vectors to the view space point. Right?
Finally, transforming by the projection matrix gets me to clip space.
* this would akin to calculating normalize(cross(endNormal, camPosition - endPosition))