7ae32e91eb624f4724c56aa9f50fb20876a4799f
[occt.git] / tests / v3d / materials / bug24855
1 puts "========"
2 puts "OCC24855: Revision of parameters of standard materials"
3 puts "========"
4
5 # custom shapes
6 set aShape [locate_data_file occ/Top.brep]
7
8 # setup 3D viewer content
9 vinit View1 w=768 h=768
10 vglinfo
11
12 vsetgradientbg 180 200 255 180 180 180 2
13
14 # display shape
15 vlight change 0 pos -1 1 1
16 restore $aShape s
17 vsetdispmode 1
18 vdisplay s
19 vfit
20
21 proc testmat {dirname filename} {
22   foreach {aMatIter} {brass bronze copper gold jade neon_phc pewter obsidian plaster plastic satin silver steel stone chrome aluminium charcoal} {
23     vsetmaterial -noredraw s $aMatIter
24     vdump $dirname/${filename}_${aMatIter}.png
25   }
26 }
27
28 # make material screenshots
29 testmat $imagedir $casename
30
31 vshaderprog s phong
32 testmat $imagedir ${casename}_phong
33
34 vrenderparams -raytrace -reflections -fsaa
35 vtextureenv on 5
36
37 testmat $imagedir ${casename}_rt
38
39 vclear
40 vrenderparams -rasterization
41 vtextureenv off
42 source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl