home *** CD-ROM | disk | FTP | other *** search
- /* rh_pointlight -- A custom pointlight shader for using pointlights
- * in Rhino. This one uses the light color for determining the intensity,
- * since Rhino currently does not have a light intensity setting.
- * The intensity varies between 1 and 4.9e8.
- * It is based on pointlight.sl by Pixar.
- *
- * pointlight.sl - Standard point light source for RenderMan Interface.
- * (c) Copyright 1988, Pixar.
- *
- * The RenderMan (R) Interface Procedures and RIB Protocol are:
- * Copyright 1988, 1989, Pixar. All rights reserved.
- * RenderMan (R) is a registered trademark of Pixar.
- */
-
- light
- rh_pointlight (color lightcolor = 1;
- point from = point "shader" (0,0,0);)
- {
- float intensity, maxintensity;
-
- maxintensity = max ( comp( lightcolor, 0), comp( lightcolor, 1), comp(lightcolor, 2));
- intensity = exp( maxintensity * 20);
-
- illuminate (from)
- Cl = intensity * lightcolor / (L . L);
- }
-