From 0e8e6f43e503b2a03abf59f0ec4cb95925e3f1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 1 Oct 2019 16:29:00 +0200 Subject: [PATCH] Shaders: adjust thresholds for Flat/Phong vertex color WebGL 1 tests. --- src/Magnum/Shaders/Test/FlatGLTest.cpp | 4 ++-- src/Magnum/Shaders/Test/PhongGLTest.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Shaders/Test/FlatGLTest.cpp b/src/Magnum/Shaders/Test/FlatGLTest.cpp index 67913e4f1..3a1b2f231 100644 --- a/src/Magnum/Shaders/Test/FlatGLTest.cpp +++ b/src/Magnum/Shaders/Test/FlatGLTest.cpp @@ -659,7 +659,7 @@ template void FlatGLTest::renderVertexColor2D() { const Float maxThreshold = 1.334f, meanThreshold = 0.015f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ - const Float maxThreshold = 1.334f, meanThreshold = 0.013f; + const Float maxThreshold = 15.334f, meanThreshold = 4.355f; #endif CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */ @@ -717,7 +717,7 @@ template void FlatGLTest::renderVertexColor3D() { const Float maxThreshold = 76.67f, meanThreshold = 0.072f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ - const Float maxThreshold = 76.67f, meanThreshold = 0.072f; + const Float maxThreshold = 76.67f, meanThreshold = 3.908f; #endif CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */ diff --git a/src/Magnum/Shaders/Test/PhongGLTest.cpp b/src/Magnum/Shaders/Test/PhongGLTest.cpp index 4d735050c..b4e2f2772 100644 --- a/src/Magnum/Shaders/Test/PhongGLTest.cpp +++ b/src/Magnum/Shaders/Test/PhongGLTest.cpp @@ -882,7 +882,7 @@ template void PhongGLTest::renderVertexColor() { const Float maxThreshold = 105.4f, meanThreshold = 0.075f; #else /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's worse */ - const Float maxThreshold = 105.4f, meanThreshold = 0.075f; + const Float maxThreshold = 105.4f, meanThreshold = 3.254f; #endif CORRADE_COMPARE_WITH( /* Dropping the alpha channel, as it's always 1.0 */