1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0030575: Tests - v3d/materials unstable image screenshots of alpha-blending on GeForce with MSAA

testdiff now looks for "IMAGE_COLOR_TOLERANCE: Tol" statements in log
to execute diffimage with -toleranceOfColor Tol parameter.

Image difference is first performed with 0 tolerance and then optionally with non-zero tolerance,
so that the log always includes information that some images are different,
but with two different messages:
- "IMAGE differs" for images failed comparison;
- "IMAGE is similar" for images passed comparison only with non-zero tolerance.

v3d/materials - disabled MSAA and removed duplicate.
demo/samples/materials - compare screenshots with 0.8% color tolerance (2/255).
This commit is contained in:
kgv
2019-03-15 00:12:12 +03:00
committed by apn
parent 6072d5975a
commit f2b42160f4
8 changed files with 76 additions and 50 deletions

View File

@@ -1,4 +1,8 @@
# test for visual properties of materials in 3d viewer
puts "Test visual properties of materials in 3d viewer"
puts "Workaround instability on GeForce cards with MSAA at semitransparent sphere"
puts "IMAGE_COLOR_TOLERANCE: 0.008"
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
# make a snapshot

View File

@@ -1,5 +1,5 @@
puts "========"
puts "OCC24855: Revision of parameters of standard materials"
puts "0024855: Revision of parameters of standard materials"
puts "========"
# custom shapes
@@ -14,8 +14,7 @@ vsetgradientbg 180 200 255 180 180 180 2
# display shape
vlight -change 0 -dir 0.577 -0.577 -0.577
restore $aShape s
vsetdispmode 1
vdisplay s
vdisplay -dispMode 1 s
vfit
proc testmat {dirname filename} {
@@ -25,18 +24,15 @@ proc testmat {dirname filename} {
}
}
# make material screenshots
# material screenshots, Gouraud shading model (rasterization)
vrenderparams -shadingModel GOURAUD
testmat $imagedir $casename
vshaderprog s phong
# material screenshots, Phong shading model (rasterization)
vrenderparams -shadingModel PHONG
testmat $imagedir ${casename}_phong
# material screenshots, Ray-Tracing
vrenderparams -raytrace -reflections -fsaa
vtextureenv on 5
testmat $imagedir ${casename}_rt
vclear
vrenderparams -rasterization
vtextureenv off
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl

View File

@@ -1,10 +0,0 @@
puts "========="
puts "OCC24872"
puts "========="
puts ""
###########################################################
# Support of emission color in Phong shader and ray-tracing
###########################################################
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
vshaderprog phong

View File

@@ -1,10 +0,0 @@
puts "========="
puts "OCC24872"
puts "========="
puts ""
###########################################################
# Support of emission color in Phong shader and ray-tracing
###########################################################
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
vrenderparams -raytrace

View File

@@ -0,0 +1,8 @@
puts "========="
puts "0024872: Support of emission color in Phong shader and ray-tracing"
puts "Test emission material within Phong rasterization model"
puts "========="
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
vrenderparams -shadingModel PHONG -msaa 0

View File

@@ -0,0 +1,8 @@
puts "========="
puts "0024872: Support of emission color in Phong shader and ray-tracing"
puts "Test emission material within Ray-Tracing"
puts "========="
puts ""
source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl
vrenderparams -raytrace -msaa 0