64c759f8 |
1 | puts "========" |
2 | puts "Ray Tracing - check lighting on Plastic material" |
3 | puts "========" |
4 | |
5 | # create box |
6 | box b 1 2 3 |
7 | |
8 | # draw box |
9 | vinit View1 |
10 | vclear |
11 | vsetdispmode 1 |
12 | vaxo |
13 | vdisplay b |
14 | vsetmaterial b PLASTIC |
15 | vsetcolor b GREEN |
16 | vfit |
17 | vrotate 0.2 0.0 0.0 |
18 | |
19 | # take snapshot with fixed pipeline |
20 | vdump $::imagedir/${::casename}_OFF.png |
21 | set aColorL [vreadpixel 150 250 rgb name] |
22 | set aColorR [vreadpixel 250 250 rgb name] |
23 | if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { |
24 | puts "Error: wrong color (fixed pipeline)!" |
25 | } |
26 | |
27 | vraytrace 1 |
64c759f8 |
28 | set aColorL [vreadpixel 150 250 rgb name] |
29 | set aColorR [vreadpixel 250 250 rgb name] |
30 | #if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } { |
31 | # puts "Error: wrong color (Ray Tracing)!" |
32 | #} |