Instancing grouping based on stencil buffer

Avatar
  • updated
  • Under Consideration

In my current project, I'm using the stencil buffer to mask multiple objects in my scene. These are all set to prefabs, and so I have a lot of objects that use the exact same stencil buffer settings but can't be instanced. This isn't a big deal on PC, however less performant GPUs (Nintendo Switch in my case) really suffer. It would be really cool if we could generate instanced materials based on a stencil buffer preset.


Not sure how difficult this would be. Would love some insight if there are better alternatives to what I'm currently doing!

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

at the moment, the only way to get instancing with custom render settings like this is using immediate mode, although that on its own has its own caveats and workflow differences that might make it difficult to work with

right now there's no plan to support sharing the same material, but it's something I can consider