0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / opengl / data / textures / pbr_tangent_normal
diff --git a/tests/opengl/data/textures/pbr_tangent_normal b/tests/opengl/data/textures/pbr_tangent_normal
new file mode 100644 (file)
index 0000000..e371c6c
--- /dev/null
@@ -0,0 +1,31 @@
+puts "========"
+puts "0031302: Visualization, TKOpenGl - wrong tangent space calculation for normal maps"
+puts "Test for tangent space orientation."
+puts "========"
+
+pload XDE OCAF MODELING VISUALIZATION
+
+# PBR doesn't work with Compatible Profile on macOS
+if { $::tcl_platform(os) == "Darwin" } { vcaps -core }
+
+vclear
+vclose ALL
+
+vinit v -w 1024 -h 1024
+vcamera -persp
+vbackground -cubemap [locate_data_file Circus_CubeMap_V.png]
+vrenderparams -shadingModel PBR
+
+vlight -clear
+vlight -add ambient
+
+Close D -silent
+ReadGltf D [locate_data_file bug31302_NormalTangentTest.gltf]
+XDisplay -dispmode 1 D
+
+vfront
+vfit
+vdump $imagedir/${casename}_front.png
+
+vback
+vdump $imagedir/${casename}_back.png