@mvaligursky hmm, but using layers would mean there is a one way drawing sequence of objects, right? Like, L3 over L2 over L1. How can I then make L1 over L3 afterwards?
@yaustar interesting. Do you mean some sort of fragment shader?
Yeah, I was thinking about somehow using the green ball camera render capture as a mask for the red cone. No idea how to do it but that’s where my mind is going at the moment
Right, so the use case is I want this arrow mesh not to clip through the level (should be rendered on top of everything), but at the same time should not be rendered over the ball, so it would visually penetrate the ball.
@mvaligursky yes, I tried it. I would work fine for a table. However, this is a golf type of a game, with different level pieces, which should occlude the ball if they are in the way. With the setup you mentioned the ball would be drawn on top of the level pieces.
In your case, because it’s only the ball that shouldn’t be rendered over by the arrow, you can use a variant of my method. If you are willing to share a very basic fork of your golf issue, we can try to make it work specifically to your project
Well, the demo project actually replicates the setup that is needed. I can change it a bit, e.g. using a plane as an arrow and move around the boxes. One moment.
Separate layer. But that only defines the order, nothing else. Depth buffer should still work between layers. You don’t disable depth-test on the ball or something like that?