Browse Source

tests: Make shadowViewMatrix test less sensitive

rdb 1 year ago
parent
commit
dfc85b8a68
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tests/display/test_glsl_shader.py

+ 2 - 1
tests/display/test_glsl_shader.py

@@ -603,7 +603,8 @@ def test_glsl_state_light_source(gsg):
     assert(p3d_LightSource[0].shadowViewMatrix[3][1] < -16.8508);
     assert(p3d_LightSource[0].shadowViewMatrix[3][1] < -16.8508);
     assert(p3d_LightSource[0].shadowViewMatrix[3][2] > -22.0003);
     assert(p3d_LightSource[0].shadowViewMatrix[3][2] > -22.0003);
     assert(p3d_LightSource[0].shadowViewMatrix[3][2] < -22.0001);
     assert(p3d_LightSource[0].shadowViewMatrix[3][2] < -22.0001);
-    assert(p3d_LightSource[0].shadowViewMatrix[3][3] == -21);
+    assert(p3d_LightSource[0].shadowViewMatrix[3][3] > -21.0001);
+    assert(p3d_LightSource[0].shadowViewMatrix[3][3] < -20.9999);
     assert(p3d_LightSource[1].color == vec4(9, 10, 11, 12));
     assert(p3d_LightSource[1].color == vec4(9, 10, 11, 12));
     assert(p3d_LightSource[1].specular == vec4(13, 14, 15, 16));
     assert(p3d_LightSource[1].specular == vec4(13, 14, 15, 16));
     assert(p3d_LightSource[1].diffuse == vec4(9, 10, 11, 12));
     assert(p3d_LightSource[1].diffuse == vec4(9, 10, 11, 12));