0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / tests / v3d / glsl / gouraud_pos1
CommitLineData
5f4bd4d4 1puts "========"
2puts "Per-vertex lighting using built-in GLSL program, one positional light source."
3puts "Visual comparison with the reference snapshot should be performed for this test case."
4puts "========"
5
8e0a2b19 6vclear
7vclose ALL
8vinit View1
9
5f4bd4d4 10# create objects
11set anX 0.001
12circle c 0 0 0 0.001
13mkedge e c
14wire w e
15plane s
16mkface f1 s w
17mkface f2 s w
18ttranslate f1 $anX -0.001 0
19
20# display objects
21vtop
22vdisplay -dispMode 1 f1 f2
23vsetlocation f2 $anX 0.001 0
24vpoint vl $anX 0 0.001
25vfit
26
27# setup light
28vcaps -ffp 0
29vrenderparams -shadingModel vert
30vlight clear
31vlight add positional pos $anX 0 0.001 color RED1 headLight 0
32
33set aColor1 [vreadpixel 205 180 rgb name]
34set aColor2 [vreadpixel 205 210 rgb name]
35if { "$aColor1" != "RED" || "$aColor2" != "RED" } {
36 puts "Error: expected color near the light spot is RED"
37}
38
ba00aab7 39set aColor3 [vreadpixel 205 100 rgb name]
40set aColor4 [vreadpixel 205 306 rgb name]
41if { "$aColor3" != "RED4" || "$aColor4" != "RED4" } {
5f4bd4d4 42 puts "Error: expected color far from the light spot is RED4"
43}