I've spend (or wasted) half a decade on projects involving some sort of furry/feathered creatures. Happy Feet, Where The Wild Things Are, Legend of the Guardians and Happy Feet 2. So, fur shading is going to be my first subject. I will start with a simple Kajiya Kay implementation in 3Delight. Safe to say that majority of hair shaders are using this model. From real-time hair shaders on GPUs to every project I've worked on. It's fast and relatively easy to understand.
Code:
//======================================
/ diffuse component of the shading model
//======================================
color KajiyaKayHairDiffuse( vector T; )
{
// Accumulate incoming radiance from lights in C
color C = 0;
extern point P;
illuminance( P )
{
// Must declare extern L & Cl because we're in a function
extern vector L;
extern color Cl;
float nondiff = 0;
lightsource( "__nondiffuse", nondiff );
if( nondiff < 1 )
{
vector LN = normalize( L );
C += ( 1 - nondiff ) * Cl * sin( acos( T.LN ) );
}
}
return C;
}
//======================================
// specular component of the shading model
//======================================
color KajiyaKayHairSpecular(
...