/usr/share/aqsis/shaders/light/shadowspot.sl is in aqsis 1.8.1-4build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | light shadowspot(
float intensity = 1;
color lightcolor = 1;
point from = point "shader" (0, 0, 0);
point to = point "shader" (0, 0, 1);
float coneangle = radians(30);
float conedeltaangle = radians(5);
float beamdistribution = 2;
string shadowname = "";
float samples = 16;
float width = 1;
float blur = 0;
float falloff = 2)
{
float atten, cosangle;
uniform point A = (to - from) / length(to - from);
uniform float cosoutside = cos(coneangle);
uniform float cosinside = cos(coneangle - conedeltaangle);
illuminate (from, A, coneangle) {
cosangle = (L . A) / length(L);
if( falloff == 2 )
atten = pow(cosangle, beamdistribution) / (L . L);
else if( falloff == 1 )
atten = pow(cosangle, beamdistribution) / (length(L)/2);
else
atten = pow(cosangle, beamdistribution);
atten *= smoothstep(cosoutside, cosinside, cosangle);
Cl = atten * intensity * lightcolor;
if (shadowname != "")
Cl *= 1 - shadow(shadowname, Ps, "blur", blur, "width", width);
}
}
|