How can I get access to the native pointer for a shader (vert, frag)?

Not exactly what you are looking for, but…
In Unity 2022.1 we introduced some new API that allows you to submit draws a bit more efficiently. I wrote about it here in an introductory post and we will be landing some improvements to this interface going forward.

It’s not perfect and there is still a bit of main thread cost around but we are seeing great improvements with regards to CPU performance with this. One of the reasons this interface was written originally was that DrawMeshInstanced had too much overhead.

If you have the time please give it a go and let us know what you think.

1 Like