Weird ImmediateModeShapeDrawer bugs in D3D runtime

Avatar
  • updated

So Immediate mode line drawing (using ImmediateModeShapeDrawer class pattern) works fine in the editor in 6.3 LTS on windows, but all kinds of issues at runtime unfortunately (auto API or DX11)

I thought maybe turning off Instancing would fix, but it made it worse - nothing drawn at all.

With Instancing on there are some missing lines and odd bugs like this with arrows (lines and Cones) - the line is missing where it should be and appears as a flickering gradient line elsewhere as below!

Any ideas?

Image 932

Reporting a bug? please specify Unity version:
6.3.22
Reporting a bug? please specify Shapes version:
4.6.0
Reporting a bug? please specify Render Pipeline:
URP
Avatar
Andrew

This appears to be a Shader Stripping issue - unfortunately I have to set "Instancing Variants" to "Keep All" to fix any drawing issues