The alternative would be grouping the asteroids by mesh type and having a single Highlight Effect at the root. Then redesign the interior logic so it can apply the same effects to the string of meshes in that group using the same API referred above. This would require a major rewrite of the asset as the main code responsible for rendering the effects (in DoOnRenderObject()) is not designed for that. For example, you will need to implement culling as well, since the GPU instancing method assumes you perform culling by yourself and only include the visible asteroids in the array of instances to be passed to the method.
Note that this can only work for non-skinned meshes.
Thanks for the response.
It sounds like the alternative method is what I need to do. I have my own GPU instancing framework (adapted from the GPUInstancer asset) and it handles the culling and what not already provided I can get access to the highlight effect meshses. But yes, sounds like something that will take me at least a few days to figure out and come up with a way that won't require me to change too much of the internals of your asset to protect me from future updates. The GPU Instancer doesn't have a render pass whereas Highlight Effect does so I would need to understand the implications there.
Quick question: is there any sort of LOD built-in or should I handle it manually? I noticed the outline thickness is as thick zoomed out as when zoomed in. Not hard to solve jus wondering if there's something I can leverage.
By the way, have a suggestion... more of a nice-to-have (and probably not worth the effort it at this point but food for thought):
Currently when I use Highlight effect, I primarily use it for the outline effect itself so the rest (outer glow, inner glow, etc) are kind of noise to me. It would be nice if you could collapse unused effects in the inspector (ie. when their respective value is 0).
A more robust (definitely more expensive way) is to have a separate dedicated component for each effect and simply add them in as needed to the "core" highlight effect component. This would have some implications on how you handle profiles but it would have nice net effect of breaking up the code itself into smaller pieces. Highlight effect is a rather huge file.
Thanks again!