0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera...
[occt.git] / tests / v3d / raytrace / bug25833
CommitLineData
1804bb99 1puts "========"
2puts "OCC25833"
3puts "========"
4puts ""
5##########################################
6## Visualization, Ray Tracing - fix problems with the backside of triangles
7##########################################
8
9box b1 100 100 100
10explode b1 Fa
11box b2 10 10 -20 10 10 10
12
13vsetdispmode 1
14vdisplay b1_5 b1_6 b2
15vsetmaterial b1_5 steel
16vsetmaterial b1_6 steel
17vfit
18
19# Problem 1: b1_5 (grey) becomes semi-transparent after the next line,
20# compare it with b1_6 visible from the frontside
21vrenderparams -rayTrace
22vdump ${imagedir}/${test_image}_1.png
23checkcolor 100 300 0.37647059559822083 0.3803921639919281 0.40392157435417175
24if { ${stat} != 1 } {
25 puts "Error : bad color (case 1)"
26}
27
28# Problem 2: The small box shows through b1_5
29vrenderparams -reflections
30vdump ${imagedir}/${test_image}_2.png
31checkcolor 190 250 0.37647059559822083 0.3803921639919281 0.40392157435417175
32if { ${stat} != 1 } {
33 puts "Error : bad color (case 2)"
34}
35
36ttranslate b2 30 30 30
37# Problem 3: The small box is not reflected from the backface of b1_5
38vdisplay b2
39vdump ${imagedir}/${test_image}_3.png
40checkcolor 190 260 0.79607844352722168 0.60784316062927246 0.21960784494876862
41if { ${stat} != 1 } {
42 puts "Error : bad color (case 3)"
43}
44checkcolor 190 310 0.61960786581039429 0.56078433990478516 0.43529412150382996
45if { ${stat} != 1 } {
46 puts "Error : bad color (case 4)"
47}