Pixel thickness of lines changes with draw order and other unexpected weirdness.

Avatar
  • updated
  • Fixed

When drawing pixel-space lines in immediate mode I've noticed some really odd behavior that I can't quite explain. 

In general this seems to occur when the points being drawn are relatively close to the camera in Viewport space, about 1 unit or closer, but not close enough to be degenerate.

When that close, certain orientations of the camera in world space seem to impact the drawn thickness of the line drastically, even when both points are well in front of the camera. Here is an example of some of this behavior:

Youtube video

The thickness variations become especially noticeable when swapping the draw order, so instead of drawing the line from point A to B, drawing it from B to A.


The issue appears to behave the same when using Volumetric or billboard Draw.Line calls, but not when using the same data with Draw.Polyline.

Demo Source Code: https://gist.github.com/JohannesMP/9b5906c034a8797691339548b44e1320

Reporting a bug? please specify Unity version:
2019.4.16f1
Reporting a bug? please specify Shapes version:
3.0.0
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Fixed

this was fixed as a side effect of another issue! coming in the next update

Avatar
Freya Holmér creator
  • Answer
  • Fixed

this was fixed as a side effect of another issue! coming in the next update