0031999: Tests - request Core Profile on macOS for Ray-Tracing tests
[occt.git] / tests / v3d / materials / ior
CommitLineData
0858125f 1puts "========"
2puts "0031284: Visualization - XCAFDoc_VisMaterialPBR lacks Index of Refraction"
3puts "========"
4
5pload MODELING XDE OCAF VISUALIZATION
ba562b2b 6# Ray-Tracing doesn't work with Compatible Profile on macOS
7if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
8
0858125f 9box b 0.5 1.0 -0.5 3 1 1
10psphere s1 0.5
11psphere s2 0.5
12psphere s3 0.5
13ttranslate s1 1 0 0
14ttranslate s2 2 0 0
15ttranslate s3 3 0 0
16catch { Close D }
17XNewDoc D
18set l0 [XAddShape D b 0]
19set l1 [XAddShape D s1 0]
20set l2 [XAddShape D s2 0]
21set l3 [XAddShape D s3 0]
22XAddVisMaterial D m1 -baseColor GREEN -refractionIndex 1.0 -transparency 0.5 -metallic 0 -roughness 0
23XAddVisMaterial D m2 -baseColor GREEN -refractionIndex 1.3 -transparency 0.5 -metallic 0 -roughness 0
24XAddVisMaterial D m3 -baseColor GREEN -refractionIndex 2.5 -transparency 0.5 -metallic 0 -roughness 0
25XSetVisMaterial D $l1 m1
26XSetVisMaterial D $l2 m2
27XSetVisMaterial D $l3 m3
28
29vclear
30vinit View1
31vcamera -persp
32vfront
33XDisplay -dispMode 1 D
34vfit
35vviewparams -scale 245 -proj -0 -0.75 -0.66 -up 0 -0.66 0.75 -at 2.0 0.84 0.04
36vlight -change 0 -intensity 2.5
37vlight -change 1 -intensity 1.0
38set aCubeMap [locate_data_file Circus_CubeMap_V.png]
39vbackground -cubemap $aCubeMap
40
41vrenderparams -shadingModel PBR -raster
42vdump $imagedir/${casename}_pbr.png
43
44vrenderparams -raytrace -gi 0 -reflections 1 -rayDepth 10
45vfps 200
46vdump $imagedir/${casename}_rt.png
47
48vrenderparams -raytrace -gi 1
49vfps 200
50vdump $imagedir/${casename}_pt.png