- Home /
Render group of objects in front?
I have a weapon which is made up of a number of meshes, I want to render these in front of everything else in the game as an "overlay". I looked into doing this by using renderQueues or the RenderType shader tag - the problem is that to do this you also have to disable ZTest-ing which is a problem because the meshes of the weapon intersect with one another so it ends up rendering incorrectly because ZTest-ing is disabled on all of them. What I really want to be able to do is to say "Render this group of objects first with Z-Testing intact and then render this group of objects etc".
The case is actually a little more complex than the above, it requires the rendering of around 20 different groups of objects, all in different orders which means using multiple cameras isn't really very practical for performance reasons. But the above case really distills what I'm hoping to achieve.
Any help would be much appreciated - I'm really tearing my hair out over this!
Your answer
Follow this Question
Related Questions
Camera with shader? 2 Answers
Dividng clip space by "w" warps the output? 1 Answer
How do Image shaders interact with UI Canvas draw order? 0 Answers
Is there a way to render a single object with a unique color per active camera? 1 Answer
How can I make a quad render below absolutely everything else? 1 Answer