Search code examples
renderinghlslcg

What does dirAtten value mean in Kajiya-Kay Model?


In the hair rendering slide developed by Sheuermann at ATI at GDC 2004, I found code like this:

float StrandSpecular (float3 T, float3 V, float3 L, float exponent)
{
    float3 H = normalize(L + V);
    float dotTH = dot(T, H);
    float sinTH = sqrt(1.0 - dotTH*dotTH);
    float dirAtten = smoothstep(-1.0, 0.0, dot(T, H));
    return dirAtten * pow(sinTH, exponent);
}

I truly have no idea of the value dirAtten mean, what does this exactly mean in this shading model?


Solution

  • I regard this dirAtten as one attenuation coeffecient and it controls the range of the lighting you can see.