Making an object render in screenspace?

I have 2 spheres in my scene. “Big Sphere” is large and “Little Sphere” is small. I need to render “Little Sphere” in front of “Big Sphere”.

In order to achieve this, I figure the best way would be to have the “Little Sphere” render in screen space, so that no matter what it is always seen, even when it is positioned behind other objects.

How can I go about doing this?

some options

1 Like

I am pretty sure that the render queue only has to do with objects that are rendered in the same position. I did already try it anyway, and I had no luck.

2nd camera might work, but wouldn’t that just add a performance hit?

2nd (depth-only) camera is often the scapegoat of performance drop and people should do their profiling properly. Also always remember to remove all the unnecessary audio listener/flare layer/GUI components when you add a new default camera object to the scene.

Really? I was only assuming it would have issues. Guess I could try it and profile it…

Follow up solution to those who land here in the future:

Use a custom shader with ZTest set to “Always”. You will also need to make sure it has a render order that is appropriate, such as 4000.