Fur examples

Does anyone know where I can find out how to create a fur shader?

For example, a lot of resources talk about Shells and layering them. Okay that’s cool.
But what is a Shell and how does one make one and layer it? I mean I understand the concept of a shell, but how it is actually made, that’s the part I don’t get and there seems to be a big lack of information out there on how one makes one, not just for Unity but in general like it’s some form of dark arts for even the most primitive fur shader.

Any help with be extremely appreciated.
Thank you,
David.

The basic version of a shell is the base mesh scaled up slightly, usually along it’s vertex normal, like a outline shader. So you render the base mesh normally, then with a second pass render a slightly larger shell with alpha testing, then a slightly larger shell with slightly lower alpha cutoff. Then a slightly larger shell with slightly lower alpha cutoff. Then another slightly larger shell. Then another shell.

Then another.

And another.

And another.

And … etc.

How many shells you’ll want / need will depend on the quality and length of the fur you want to simulate. 4~5 shell passes is usually a bare minimum. 10~20 is going to get expensive, but the quality will be pretty good. I’ve seen some shaders use up to 50, but they could have used a third of that and gotten nearly identical quality for far less performance impact. The shell technique falls down a bit when it comes to really long hair too.

If you search for Unity Fur you’ll find a handful of free shader examples.

I did finally find a working example fur shader.
But it has a problem, which I’d expect from a free shader of course.

It gets super shiny and can’t see the fur either on the areas the light is directly hitting (and gets super white on the outer parts).
But in the more shadow like areas in the back it renders how I’d expect it too and looks good.

4678886--440708--FurGood.jpg
4678886--440711--FurBad.png

Sense the Fur Shader is free and open source to use how you’d like. I’ll link up the source code for it.

Here’s the link to the paste bin of the Shader.
https://pastebin.com/Mn7aQqhZ

And here’s the link to the CGINC paste bin.
https://pastebin.com/RBfjKPGE

From my limited knowledge of shaders I assume it is coming from the lighting model as I’m not seeing anything to deal with Smoothness, Metallic, etc.

Well I think I figured out the exceptional shininess. I just commented out line 28 in the CGINC file.

But after looking around models a bit with the shader applied to it, it turns out the entire model becomes transparent.
So for example a Wolf’s front left leg if look at through an angle can show the wolfs back right leg behind it.

I figured out the transparency issues, I commented out ZWrite Off, but not sure if that’s really effecting the shader otherwise - if it is I ain’t seeing any problems with it.