Multiple discs wont draw in an Immediate Mode loop

Avatar
  • updated
  • Under Review

I'm using Shapes Immediate Mode in URP to draw polygons and draw discs on the points of those polygons. In Unity 2020.3.10 this functionality worked, but my team has updated to 2021.1.10 and now only the first point in a shape gets its disc drawn - adding any more shapes causes no discs at all to be drawn. I've tested with different color and alpha values and the result is the same.

I've also debugged out all of my data so there are multiple points there to be drawn when I'm expecting it to, so I think it's something to do with Shapes and the latest version of URP.

Also, multiple Polygon shapes are drawn flawlessly - it just seems to be these specific looped discs.

Here's the logic:

Thanks in advance for any support, and thanks for making an amazing tool!

Reporting a bug? please specify Unity version:
2021.1.10
Reporting a bug? please specify Shapes version:
3.2.3
Reporting a bug? please specify Render Pipeline:
URP
Avatar
Freya Holmér
  • Under Review

sounds like it's GPU instancing or shader related!


  1. make sure your project supports GPU instancing. I think URP might have some setting that will force it off in favor of the SRP batcher
  2. you can check if it's instancing related by turning off GPU instancing in the Shapes settings window. It will very likely start working as soon as you turn it off, but, ideally it should of course be on!
  3. try doing a clean install of Shapes

let me know if it makes a difference!

Avatar
Tom Kail

We also had this problem - except with lines! It was working fine for weeks, until I noticed it wasn't - "Regenerate Shaders and Materials" in the Shapes Settings fixed it for us!

Avatar
dom

Thanks! Disabling GPU instancing on Shapes did it! however re-enabling it and disabling the SRP batcher didn't fix it. Also had no luck with regenerating the shaders/materials

Avatar
Freya Holmér
Quote from dom

Thanks! Disabling GPU instancing on Shapes did it! however re-enabling it and disabling the SRP batcher didn't fix it. Also had no luck with regenerating the shaders/materials

you should be able to leave it on though - did you try a clean reinstall?

Avatar
dom
Quote from Freya Holmér

you should be able to leave it on though - did you try a clean reinstall?

sorry for the late reply, but I did a clean reinstall, updated to the latest, and it didn't help this im afraid /:

Avatar
Freya Holmér

4.1.0 has now been submitted to the asset store - can you try it again once you see the update on your end? :)