Example 2: Light Passes

Text    hb_plastic.sl    prepare.rib    interact.sl    interact.rib    Makefile

interact.sl

surface main( varying color Cambient=0;

varying color Clight1=0;

varying color Clight2=0;

varying color Clight3=0;

uniform float intensityA=1;

uniform float intensity1=1;

uniform float intensity2=1;

uniform float intensity3=1;

uniform color lightcolorA=1;

uniform color lightcolor1=1;

uniform color lightcolor2=1;

uniform color lightcolor3=1;

)

{

Ci=Cambient*intensityA*lightcolorA

+ Clight1*intensity1*lightcolor1

+ Clight2*intensity2*lightcolor2

+ Clight3*intensity3*lightcolor3;

}