2 puts "Per-fragment lighting using built-in GLSL program, one spot light source."
3 puts "Visual comparison with the reference snapshot should be performed for this test case."
18 ttranslate f1 $anX -0.001 0
22 vdisplay -dispMode 1 f1 f2
23 vsetlocation f2 $anX 0.001 0
24 vpoint vl $anX 0 0.001
29 vrenderparams -shadingModel phong
31 vlight add spotLight pos $anX 0 0.001 dir 0 0 -1 angle 60 constAtten 0.1 exponent 0.1 color RED1 headLight 0
33 set aColor1 [vreadpixel 205 180 rgb name]
34 set aColor2 [vreadpixel 205 220 rgb name]
35 if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
36 puts "Error: expected color near the light spot is RED"
39 set aColor3 [vreadpixel 205 132 rgb name]
40 set aColor4 [vreadpixel 205 280 rgb name]
41 if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
42 puts "Error: expected color mid from the light spot is RED4"
45 set aColor5 [vreadpixel 205 100 rgb name]
46 set aColor6 [vreadpixel 205 306 rgb name]
47 if { "$aColor5" != "GRAY7" || "$aColor6" != "GRAY8" } {
48 puts "Error: expected color far from the light spot is GRAY7"