blob: 488aa1e47f8e1ac99873e367014027e85d65459a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
float spotEdf( float exponent )
{
float att = 1.0;
float dist = length(viewDir);
vec3 spotDir = viewDir / dist;
float spot = max(0.0f, dot(spotDir, normal));
att = pow(spot, exponent);
return att;
}
|