1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/tests/v3d/raytrace/bug24130
dbp fc73a20256 0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and portability
RayTracing - disable reflections by default
Fix possible compilation issue on Mac OS X.
2014-04-04 14:15:08 +04:00

46 lines
1.1 KiB
Plaintext

puts "========"
puts "OCC24130 Implementing ray tracing visualization core"
puts "========"
# custom shapes
set aShape1 [locate_data_file occ/Top.brep]
set aShape2 [locate_data_file occ/Bottom.brep]
# setup 3D viewer content
vinit name=View1 w=512 h=512
vglinfo
vvbo 0
vsetdispmode 1
vsetgradientbg 180 200 255 180 180 180 2
restore $aShape1 s1
restore $aShape2 s2
vdisplay s1 s2
vsetmaterial s1 Silver
vsetmaterial s2 Pewter
vlight change 0 pos -1 1 1
vfit
# activate ray-tracing
vraytrace 1
set aModeNum 0
for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
for { set aReflMode 0 } { $aReflMode <= 1 } { incr aReflMode } {
for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
vsetraytracemode shad=$aShadMode refl=$aReflMode aa=$aAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}
}
vtextureenv on 5
for { set aAAMode 0 } { $aAAMode <= 1 } { incr aAAMode } {
for { set aShadMode 0 } { $aShadMode <= 1 } { incr aShadMode } {
vsetraytracemode shad=$aShadMode refl=1 aa=$aAAMode
vdump $imagedir/${casename}_${aModeNum}.png
incr aModeNum
}
}