0029084: Visualization, AIS_Manipulator - broken transformation is applied at Rotatio...
[occt.git] / tests / v3d / glsl / phong_plastic
CommitLineData
64c759f8 1puts "========"
2puts "Per-pixel lighting using GLSL program (Phong shading), check plastic material"
3puts "========"
4
5# create box
6box b 1 2 3
7
8# draw box
9vinit View1
10vclear
11vsetdispmode 1
12vaxo
13vdisplay b
14vsetmaterial b PLASTIC
15vsetcolor b GREEN
16vfit
17vrotate 0.2 0.0 0.0
18
19# take snapshot with fixed pipeline
20vdump $::imagedir/${::casename}_OFF.png
21set aColorL [vreadpixel 150 250 rgb name]
22set aColorR [vreadpixel 250 250 rgb name]
23if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
24 puts "Error: wrong color (fixed pipeline)!"
25}
26
27vshaderprog b phong
28set aColorL [vreadpixel 150 250 rgb name]
29set aColorR [vreadpixel 250 250 rgb name]
30if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
31 puts "Error: wrong color (Phong shader)!"
32}