0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and...
[occt.git] / tests / v3d / raytrace / bug24130
CommitLineData
e276548b 1puts "========"
2puts "OCC24130 Implementing ray tracing visualization core"
3puts "========"
4
5# custom shapes
6set aShape1 [locate_data_file occ/Top.brep]
7set aShape2 [locate_data_file occ/Bottom.brep]
8
9# setup 3D viewer content
10vinit name=View1 w=512 h=512
11vglinfo
12
13vvbo 0
14vsetdispmode 1
15vsetgradientbg 180 200 255 180 180 180 2
16restore $aShape1 s1
17restore $aShape2 s2
18vdisplay s1 s2
19vsetmaterial s1 Silver
20vsetmaterial s2 Pewter
265d4508 21vlight change 0 pos -1 1 1
e276548b 22vfit
23
24# activate ray-tracing
25vraytrace 1
e276548b 26
27set aModeNum 0
28for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
29 for { set aReflMode 0 } { $aReflMode <= 1 } { incr aReflMode } {
30 for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
31 vsetraytracemode shad=$aShadMode refl=$aReflMode aa=$aAAMode
32 vdump $imagedir/${casename}_${aModeNum}.png
33 incr aModeNum
34 }
35 }
36}
37
38vtextureenv on 5
39for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
40 for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
41 vsetraytracemode shad=$aShadMode refl=1 aa=$aAAMode
42 vdump $imagedir/${casename}_${aModeNum}.png
43 incr aModeNum
44 }
45}