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."
6 pload MODELING VISUALIZATION
19 ttranslate f1 $anX -0.001 0
23 vdisplay -dispMode 1 f1 f2
24 vsetlocation f2 $anX 0.001 0
25 vpoint vl $anX 0 0.001
30 vrenderparams -shadingModel phong
32 vlight spot -type SPOTLIGHT -pos $anX 0 0.001 -dir 0 0 -1 -spotAngle 60 -constAtten 0.1 -exponent 0.1 -color RED1 -headLight 0
34 set aColor1 [vreadpixel 205 180 rgb name]
35 set aColor2 [vreadpixel 205 220 rgb name]
36 if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
37 puts "Error: expected color near the light spot is RED"
40 set aColor3 [vreadpixel 205 132 rgb name]
41 set aColor4 [vreadpixel 205 280 rgb name]
42 if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
43 puts "Error: expected color mid from the light spot is RED4"
46 set aColor5 [vreadpixel 205 100 rgb name]
47 set aColor6 [vreadpixel 205 306 rgb name]
48 if { "$aColor5" != "GRAY7" || "$aColor6" != "GRAY8" } {
49 if { "$aColor5" != "GRAY2" && "$aColor6" != "GRAY2" } {
50 puts "Error: expected color far from the light spot is GRAY7"
53 vdump ${imagedir}/${casename}.png