A point light source is the converse of a distant light. It radiates light in all directions, but from a single location.
light pointlight (
float intensity = 1;
color lightcolor = 1;
point from = point "shader" (0,0,0))
{
illuminate (from)
Cl = intensity * lightcolor / (L.L);
}
Within illuminate46 L is a vector from the position of the light source to the
surface point being illuminated. The dot product implements the
square-law falloff of light intensity with distance from the source.