vertxxyz / Vertx.Debugging

Debugging utilities for Unity
MIT License
519 stars 34 forks source link

Support for solid shapes? #38

Open DoomT-AliW opened 2 weeks ago

DoomT-AliW commented 2 weeks ago

It would be nice to have support for drawing solid spheres or boxes with transparency.

How would I go about adding support for that myself? Will be looking into the source code more in depth.

Thanks

vertxxyz commented 2 weeks ago

See https://github.com/vertxxyz/Vertx.Debugging/issues/15. Sadly it's not a small amount of work to add that support properly, and I don't currently have the time.

I'll note that the current implementation attempts to reduce every drawn shape into a reduced set of line meshes and materials to reduce batching, and as solid mesh drawing can't be reduced in that way, I've been hesitant to open the rabbit hole to support it.

If I was to do it correctly I would probably explore BatchRendererGroup and rework the current code around it, as it has mesh registration support that seems less restrictive than the DrawMeshInstancedProcedural call that's currently used.