Model outline, but occlulded by other models in the world?

Hi, I need an outline. I successfully used the post-processing outline found on the examples page. This is great when you need the object to be seen behind obstacles. However, in my case, I need to show that the object is selected, but not draw the outline on top of everything. If modifying the current outline solution, it would require to somehow render all other objects in the world and substract them from the selected object if they overlap. However, I have no idea how to achieve it. If there is any other solution, maybe a shader, (postprocessing is too heavy for mobile), I’d be glad to know it. Thank you!

typically a “vertex extrusion” solution is used for those, read more here: 5 ways to draw an outline

But I’m not sure there’s a PlayCanvas project that shows how to do this.

1 Like