1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/v3d/glsl/phong_plastic
kgv 64c759f898 0024350: TKOpenGl - non-physical materials are ignored by GLSL program manager
GLSL and Ray Tracing - take into account non-physical materials.
Move Ray Tracing test cases to v3d/raytrace grid.
2013-11-14 12:53:13 +04:00

33 lines
754 B
Plaintext

puts "========"
puts "Per-pixel lighting using GLSL program (Phong shading), check plastic material"
puts "========"
# create box
box b 1 2 3
# draw box
vinit View1
vclear
vsetdispmode 1
vaxo
vdisplay b
vsetmaterial b PLASTIC
vsetcolor b GREEN
vfit
vrotate 0.2 0.0 0.0
# take snapshot with fixed pipeline
vdump $::imagedir/${::casename}_OFF.png
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
puts "Error: wrong color (fixed pipeline)!"
}
vshaderprog b phong
set aColorL [vreadpixel 150 250 rgb name]
set aColorR [vreadpixel 250 250 rgb name]
if { "$aColorL" != "GREEN3" || "$aColorR" != "GREEN4" } {
puts "Error: wrong color (Phong shader)!"
}