Included in the following set of shaders is a spotlight shader that can be assigned stencil and gel texmaps. Rotation, blur, shadow maps, light distance cut-off and other features are included with numerous comments explaining some of the inner workings of a renderer such as PRMan and BMRT. Also included is a laser light shader that if you look at the code explains the difference between solar() and illuminate() statement blocks.
The following images show the difference between a large blur using an old mip map method to create the blur (which if you look you can see horizontal and vertical lines introduced into the image) and a new "disk" filter available with PRMan 3.8.
