Hello! I'm a bit unsure of how to implement a system which could render instances of sprites and then apply an outline shader on all instances (see image) , so instead of each instance having its own outline, it would apply a singular shared outline. I assume I'd have to create some kind of instancing system similar to the one in https://github.com/bevyengine/bevy/blob/latest/examples/shader/shader_instancing.rs, but I'm unsure if this would work the way I want it to work as is or if I need to create some additional logic for it to render as a singular unit. I'm also pretty new to bevy and graphical programming in general so I'm sure there's something really simple I don't know about here, I just don't know where to find that information 😛
#Batch render instances as a singular unit
1 messages · Page 1 of 1 (latest)
I think you will need two renderpasses, one that just renders all the sprite without any outlines (preferably instanced). And then a shader that applies the outline. I I don't think you could do this as a single unit
If your example is representative, you could achieve the effect by having the outlines as separate objects attached to the front object, but further back.
If none of the front objects are far back enough to go behind the outlines you will get this effect.
Otherwise I think you’ll need to do something with shaders as Hugo suggested.
Okay, thanks for the help. I left out a few minor details that might make it a bit harder to implement it with multiple objects so sounds like having two render passes seems to be the way to go then. Is there any example or documentation regarding having several rendering passes that you know of?