0032237: Visualization, TKOpenGl - fix Gouraud shading within perspective camera...
[occt.git] / tests / v3d / shadows / dir1
1 puts "========"
2 puts "0032039: Visualization, TKOpenGl - implement simple shadow mapping for a direct light source"
3 puts "Test shadow map from a single directional light source on a box geometry."
4 puts "========"
5
6 pload MODELING VISUALIZATION
7 if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
8 box b 1 2 3
9 box bb -5 -5 0 10 10 0 -preview
10 vgldebug 1
11 vcaps -core
12 vcaps -vsync 0
13 vclear
14 vinit View1
15 vrenderparams -shadingModel PHONG
16 vdisplay -dispMode 1 b bb
17 vaspects bb -material STONE
18 vfit
19 vlight -change 0 -castShadows 1 -direction 1 1 -1 -head 0
20
21 vraytrace 1
22 vdump $::imagedir/${::casename}_raytrace.png
23
24 vraytrace 0
25 vrenderparams -shadingModel phong
26 vrenderparams -shadowMapBias 0.01
27 vdump $::imagedir/${::casename}_phong.png
28
29 vrenderparams -shadingModel pbr
30 vdump $::imagedir/${::casename}_pbr.png