So, I’ve been writing my own fur shader (because I have only seen one half-decent one around, and I don’t have the money to buy it), and it’s been going pretty well so far. Lighting is a bit dodgy, but only because I don’t have Unity Pro (I could fix it with that, I think). I’m happy to use it as it is at the moment, except for one thing. This shader works by rendering a solid base layer, then gradually stepping out the vertices, and rendering 10 fur layers, stacking on top of each other to produce the hairs. The first layer is rendered with ZWrite On, as well as being tagged as Opaque. The fur layers, however, are rendered with ZWrite Off, and are tagged as Transparent (with the appropriate render queue). However, this is producing problems, as for some reason they seem to always render behind my trees’ leaves. No matter what I do to the render queue, I can’t seem to get this to work - instead, the only thing I can do is to turn on ZWrite, and this just culls out the leaves, which is almost as bad. I’m fairly new to fragment shaders (I’ve mostly worked with surface shaders before now), so if anyone could help me out here, I’d really appreciate it. Here’s a screenshot of the effect:
[15904-fur+issue.png|15904]
I hope that someone can help me out!