0028572: Modeling Algorithms - Wrong result of the mkface command
[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
64c759f8 9vclear
8e0a2b19 10vclose ALL
11vinit View1
64c759f8 12vsetdispmode 1
13vaxo
14vdisplay b
15vsetmaterial b PLASTIC
16vsetcolor b GREEN
17vfit
18vrotate 0.2 0.0 0.0
19
20# take snapshot with fixed pipeline
21vdump $::imagedir/${::casename}_OFF.png
22set aColorL [vreadpixel 150 250 rgb name]
23set aColorR [vreadpixel 250 250 rgb name]
ba00aab7 24if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (fixed pipeline)!" }
64c759f8 25
26vshaderprog b phong
27set aColorL [vreadpixel 150 250 rgb name]
28set aColorR [vreadpixel 250 250 rgb name]
ba00aab7 29if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { puts "Error: wrong color (Phong shader)!" }