- Home /
draw mesh on top
How to draw mesh on top? tried ZOffset in shader, but not work with toon shader correctly.
Answer by Paulius-Liekis · Sep 19, 2011 at 08:09 AM
On top of what?
Try setting Material.renderQueue to some value - it allows you to control rendering order.
Edit: renderQueue will allow you to render hands last, but it will still check Z buffer, so you want to do something about that. First idea is to disable Z-check, but that doesn't work in most cases, because it won't check hands agains themselves. So what you really want is either to play with that zbias (although I'm not so familiar with it) or clear Z buffer before rendering hands.
Answer by friuns3 · Sep 19, 2011 at 10:49 PM
On top of all objects, need it for fps game, hands should be rendered on top of all objects
tried -1 and 5000 values no effect
foreach (var a in Hands.GetComponentsInChildren()) foreach (var b in a.sharedMaterials) { b.renderQueue = -1; }
Your answer
![](https://koobas.hobune.stream/wayback/20220612214512im_/https://answers.unity.com/themes/thub/images/avi.jpg)