Browse Source

MeshTools,Shaders: make the rendering tests pass on llvmpipe.

pull/427/merge
Vladimír Vondruš 6 years ago
parent
commit
97e3e2a8fe
  1. 15
      src/Magnum/MeshTools/Test/CompileGLTest.cpp
  2. 25
      src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp
  3. 9
      src/Magnum/Shaders/Test/FlatGLTest.cpp
  4. 8
      src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp
  5. 23
      src/Magnum/Shaders/Test/PhongGLTest.cpp
  6. 9
      src/Magnum/Shaders/Test/VectorGLTest.cpp

15
src/Magnum/MeshTools/Test/CompileGLTest.cpp

@ -500,8 +500,9 @@ template<class T> void CompileGLTest::twoDimensions() {
CORRADE_COMPARE_WITH( CORRADE_COMPARE_WITH(
_framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}),
Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured2D.tga"), Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured2D.tga"),
/* SwiftShader has some minor off-by-one precision differences */ /* SwiftShader has some minor off-by-one precision differences,
(DebugTools::CompareImageToFile{_manager, 0.75f, 0.0906f})); llvmpipe as well */
(DebugTools::CompareImageToFile{_manager, 1.75f, 0.22f}));
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -787,8 +788,9 @@ template<class T> void CompileGLTest::threeDimensions() {
CORRADE_COMPARE_WITH( CORRADE_COMPARE_WITH(
_framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}),
Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured3D.tga"), Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured3D.tga"),
/* SwiftShader has some minor off-by-one precision differences */ /* SwiftShader has some minor off-by-one precision differences,
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.0948f})); llvmpipe as well */
(DebugTools::CompareImageToFile{_manager, 2.0f, 0.256f}));
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -1023,8 +1025,9 @@ void CompileGLTest::packedAttributes() {
CORRADE_COMPARE_WITH( CORRADE_COMPARE_WITH(
_framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}), _framebuffer.read({{}, {32, 32}}, {PixelFormat::RGBA8Unorm}),
Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured3D.tga"), Utility::Directory::join(COMPILEGLTEST_TEST_DIR, "textured3D.tga"),
/* SwiftShader has some minor off-by-one precision differences */ /* SwiftShader has some minor off-by-one precision differences,
(DebugTools::CompareImageToFile{_manager, 1.0f, 0.0948f})); llvmpipe more */
(DebugTools::CompareImageToFile{_manager, 2.0f, 0.259f}));
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_framebuffer.clearColor(1, Vector4ui{27}); _framebuffer.clearColor(1, Vector4ui{27});

25
src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp

@ -88,6 +88,7 @@ struct DistanceFieldVectorGLTest: GL::OpenGLTester {
- Mesa Intel - Mesa Intel
- Mesa AMD - Mesa AMD
- Mesa llvmpipe
- SwiftShader ES2/ES3 - SwiftShader ES2/ES3
- ARM Mali (Huawei P10) ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3
- WebGL 1 / 2 (on Mesa Intel) - WebGL 1 / 2 (on Mesa Intel)
@ -305,12 +306,12 @@ void DistanceFieldVectorGLTest::renderDefaults2D() {
/* Dropping the alpha channel, as it's always 1.0 */ /* Dropping the alpha channel, as it's always 1.0 */
Containers::arrayCast<Color3ub>(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>()), Containers::arrayCast<Color3ub>(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>()),
Utility::Directory::join(_testDir, "VectorTestFiles/defaults.tga"), Utility::Directory::join(_testDir, "VectorTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager, 189.0f, 6.1f})); (DebugTools::CompareImageToFile{_manager, 201.0f, 6.1f}));
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in /* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in
all channels. Apple A8 off-by-more. */ all channels. Apple A8 & llvmpipe off-by-more. */
const Float maxThreshold = 4.0f, meanThreshold = 0.077f; const Float maxThreshold = 32.0f, meanThreshold = 0.583f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.480f; const Float maxThreshold = 17.0f, meanThreshold = 0.480f;
@ -361,12 +362,12 @@ void DistanceFieldVectorGLTest::renderDefaults3D() {
/* Dropping the alpha channel, as it's always 1.0 */ /* Dropping the alpha channel, as it's always 1.0 */
Containers::arrayCast<Color3ub>(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>()), Containers::arrayCast<Color3ub>(_framebuffer.read(_framebuffer.viewport(), {PixelFormat::RGBA8Unorm}).pixels<Color4ub>()),
Utility::Directory::join(_testDir, "VectorTestFiles/defaults.tga"), Utility::Directory::join(_testDir, "VectorTestFiles/defaults.tga"),
(DebugTools::CompareImageToFile{_manager, 189.0f, 6.1f})); (DebugTools::CompareImageToFile{_manager, 201.0f, 6.1f}));
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in /* SwiftShader has off-by-one differences on edges, ARM Mali off-by-one in
all channels. Apple A8 off-by-more. */ all channels. Apple A8 and llvmpipe off-by-more. */
const Float maxThreshold = 4.0f, meanThreshold = 0.077f; const Float maxThreshold = 32.0f, meanThreshold = 0.583f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.480f; const Float maxThreshold = 17.0f, meanThreshold = 0.480f;
@ -433,11 +434,11 @@ void DistanceFieldVectorGLTest::render2D() {
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences when smoothing, Apple A8 a bit /* SwiftShader has off-by-one differences when smoothing, Apple A8 a bit
more. */ more, llvmpipe also */
const Float maxThreshold = 6.0f, meanThreshold = 0.360f; const Float maxThreshold = 32.0f, meanThreshold = 0.942f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 2.386f; const Float maxThreshold = 32.0f, meanThreshold = 2.386f;
#endif #endif
CORRADE_COMPARE_WITH(pixels, CORRADE_COMPARE_WITH(pixels,
Utility::Directory::join({_testDir, "VectorTestFiles", data.file2D}), Utility::Directory::join({_testDir, "VectorTestFiles", data.file2D}),
@ -502,11 +503,11 @@ void DistanceFieldVectorGLTest::render3D() {
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences when smoothing plus a bunch of /* SwiftShader has off-by-one differences when smoothing plus a bunch of
different pixels on primitive edges, Apple A8 a bit more. */ different pixels on primitive edges, Apple A8 & llvmpipe a bit more. */
const Float maxThreshold = 17.0f, meanThreshold = 0.204f; const Float maxThreshold = 32.0f, meanThreshold = 0.642f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 1.613f; const Float maxThreshold = 32.0f, meanThreshold = 1.613f;
#endif #endif
CORRADE_COMPARE_WITH(pixels, CORRADE_COMPARE_WITH(pixels,
Utility::Directory::join({_testDir, "VectorTestFiles", data.file3D}), Utility::Directory::join({_testDir, "VectorTestFiles", data.file3D}),

9
src/Magnum/Shaders/Test/FlatGLTest.cpp

@ -124,6 +124,7 @@ struct FlatGLTest: GL::OpenGLTester {
- Mesa Intel - Mesa Intel
- Mesa AMD - Mesa AMD
- Mesa llvmpipe
- SwiftShader ES2/ES3 - SwiftShader ES2/ES3
- ARM Mali (Huawei P10) ES2/ES3 (except instancing) - ARM Mali (Huawei P10) ES2/ES3 (except instancing)
- WebGL 1 / 2 (on Mesa Intel) (except instancing) - WebGL 1 / 2 (on Mesa Intel) (except instancing)
@ -687,8 +688,8 @@ void FlatGLTest::renderTextured2D() {
if(data.flip) pixels = pixels.flipped<0>().flipped<1>(); if(data.flip) pixels = pixels.flipped<0>().flipped<1>();
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has minor rounding errors, Apple A8 slightly more */ /* SwiftShader has minor rounding errors, Apple A8 & llvmpipe a bit more */
const Float maxThreshold = 2.334f, meanThreshold = 0.023f; const Float maxThreshold = 2.334f, meanThreshold = 0.032f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 15.667f, meanThreshold = 3.254f; const Float maxThreshold = 15.667f, meanThreshold = 3.254f;
@ -982,8 +983,8 @@ void FlatGLTest::renderAlpha3D() {
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* Minor differences between opaque and diffuse, not sure why. SwiftShader /* Minor differences between opaque and diffuse, not sure why. SwiftShader
has 5 different pixels on the edges. */ has 5 different pixels on the edges, llvmpipe some off-by-one errors */
const Float maxThreshold = 139.0f, meanThreshold = 0.280f; const Float maxThreshold = 139.0f, meanThreshold = 0.421f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 139.0f, meanThreshold = 4.587f; const Float maxThreshold = 139.0f, meanThreshold = 4.587f;

8
src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp

@ -1552,11 +1552,11 @@ void MeshVisualizerGLTest::renderObjectPrimitiveId3D() {
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImageImporter plugins not found."); CORRADE_SKIP("AnyImageImporter / TgaImageImporter plugins not found.");
/* Release build has 1 pixel slightly off. Huh. AMD has additional /* Release build has 1 pixel slightly off. Huh. AMD & llvmpipe has
off-by-one errors compared to Intel. If additional off-by-one errors compared to Intel. If
GL_NV_shader_noperspective_interpolation is not supported, the artifacts GL_NV_shader_noperspective_interpolation is not supported, the artifacts
are bigger when wireframe is enabled. */ are bigger when wireframe is enabled. */
Float maxThreshold = 1.0f, meanThreshold = 0.026f; Float maxThreshold = 10.7f, meanThreshold = 0.279f;
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(data.flags3D & MeshVisualizer3D::Flag::Wireframe && !GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) { if(data.flags3D & MeshVisualizer3D::Flag::Wireframe && !GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) {
/* SwiftShader has a bit more rounding errors */ /* SwiftShader has a bit more rounding errors */
@ -1740,7 +1740,7 @@ void MeshVisualizerGLTest::renderTangentBitangentNormal() {
/* Slight rasterization differences on AMD. If /* Slight rasterization differences on AMD. If
GL_NV_shader_noperspective_interpolation is not supported, the artifacts GL_NV_shader_noperspective_interpolation is not supported, the artifacts
are bigger. */ are bigger. */
Float maxThreshold = 1.334f, meanThreshold = 0.008f; Float maxThreshold = 1.334f, meanThreshold = 0.018f;
#ifdef MAGNUM_TARGET_GLES #ifdef MAGNUM_TARGET_GLES
if(!GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) { if(!GL::Context::current().isExtensionSupported<GL::Extensions::NV::shader_noperspective_interpolation>()) {
maxThreshold = 39.0f; maxThreshold = 39.0f;

23
src/Magnum/Shaders/Test/PhongGLTest.cpp

@ -123,6 +123,7 @@ struct PhongGLTest: GL::OpenGLTester {
- Mesa Intel - Mesa Intel
- Mesa AMD - Mesa AMD
. Mesa llvmpipe
- SwiftShader ES2/ES3 - SwiftShader ES2/ES3
- ARM Mali (Huawei P10) ES2/ES3 (except instancing) - ARM Mali (Huawei P10) ES2/ES3 (except instancing)
- WebGL 1 / 2 (on Mesa Intel) (except instancing) - WebGL 1 / 2 (on Mesa Intel) (except instancing)
@ -307,8 +308,8 @@ constexpr struct {
}, },
{"diffuse + normal", "instanced-normal.tga", Phong::Flag::NormalTexture, {"diffuse + normal", "instanced-normal.tga", Phong::Flag::NormalTexture,
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* AMD has one off pixel */ /* AMD has one off pixel, llvmpipe more */
94.0f, 0.132f, 94.0f, 0.333f,
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage */ /* WebGL 1 doesn't have 8bit renderbuffer storage */
94.0f, 0.132f, 94.0f, 0.132f,
@ -952,8 +953,8 @@ void PhongGLTest::renderTexturedNormal() {
okay. Due to the density of the normal map, SwiftShader has an overally okay. Due to the density of the normal map, SwiftShader has an overally
consistent off-by-a-bit error. AMD macOS drivers have one pixel off consistent off-by-a-bit error. AMD macOS drivers have one pixel off
due to a rounding error on the edge. Apple A8 has a slightly larger due to a rounding error on the edge. Apple A8 has a slightly larger
overall difference. */ overall difference; llvmpipe is off also. */
const Float maxThreshold = 191.0f, meanThreshold = 0.438f; const Float maxThreshold = 191.0f, meanThreshold = 0.918f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 191.0f, meanThreshold = 3.017f; const Float maxThreshold = 191.0f, meanThreshold = 3.017f;
@ -1067,19 +1068,21 @@ void PhongGLTest::renderShininess() {
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
CORRADE_EXPECT_FAIL_IF(data.shininess <= 0.0011f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader), CORRADE_EXPECT_FAIL_IF(data.shininess <= 0.0011f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader),
"SwiftShader has a much larger ring for the owerflown shininess."); "SwiftShader has a much larger ring for the overflown shininess.");
#endif #endif
#if defined(CORRADE_TARGET_ANDROID) && defined(MAGNUM_TARGET_GLES2) #if defined(CORRADE_TARGET_ANDROID) && defined(MAGNUM_TARGET_GLES2)
CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::ArmMali), CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::ArmMali),
"ARM Mali has a much larger ring for the owerflown shininess when it's exactly 0."); "ARM Mali has a much larger ring for the overflown shininess when it's exactly 0.");
#endif #endif
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::Mesa) && GL::Context::current().rendererString().find("AMD") != std::string::npos, CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::Mesa) && GL::Context::current().rendererString().find("AMD") != std::string::npos,
"AMD Mesa drivers have a much larger ring for the owerflown shininess when it's exactly 0."); "AMD Mesa drivers have a much larger ring for the overflown shininess when it's exactly 0.");
CORRADE_EXPECT_FAIL_IF(data.shininess <= 0.0011f && (GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::Mesa) && GL::Context::current().rendererString().find("llvmpipe") != std::string::npos,
"Mesa llvmpipe drivers have a much larger ring for the overflown shininess.");
#endif #endif
#if defined(CORRADE_TARGET_APPLE) && !defined(CORRADE_TARGET_IOS) #if defined(CORRADE_TARGET_APPLE) && !defined(CORRADE_TARGET_IOS)
CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && GL::Context::current().rendererString().find("AMD") != std::string::npos, CORRADE_EXPECT_FAIL_IF(data.shininess == 0.0f && GL::Context::current().rendererString().find("AMD") != std::string::npos,
"AMD on macOS has a much larger ring for the owerflown shininess when it's exactly 0."); "AMD on macOS has a much larger ring for the overflown shininess when it's exactly 0.");
#endif #endif
CORRADE_COMPARE_WITH( CORRADE_COMPARE_WITH(
/* Dropping the alpha channel, as it's always 1.0 */ /* Dropping the alpha channel, as it's always 1.0 */
@ -1202,7 +1205,7 @@ void PhongGLTest::renderAlpha() {
That's okay, as we have only 8bit texture precision. SwiftShader has That's okay, as we have only 8bit texture precision. SwiftShader has
additionally a few minor rounding errors at the edges, Apple A8 a bit additionally a few minor rounding errors at the edges, Apple A8 a bit
more. */ more. */
const Float maxThreshold = 172.667f, meanThreshold = 0.229f; const Float maxThreshold = 172.667f, meanThreshold = 0.385f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 172.667f, meanThreshold = 4.736f; const Float maxThreshold = 172.667f, meanThreshold = 4.736f;
@ -1372,7 +1375,7 @@ void PhongGLTest::renderZeroLights() {
pixels on the edges, caused by matrix multiplication being done in the pixels on the edges, caused by matrix multiplication being done in the
shader and not on the CPU side. Apple A8 sprinkles a bunch of tiny shader and not on the CPU side. Apple A8 sprinkles a bunch of tiny
differences here and there. */ differences here and there. */
const Float maxThreshold = 139.0f, meanThreshold = 0.140f; const Float maxThreshold = 139.0f, meanThreshold = 0.421f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 139.0f, meanThreshold = 2.896f; const Float maxThreshold = 139.0f, meanThreshold = 2.896f;

9
src/Magnum/Shaders/Test/VectorGLTest.cpp

@ -88,6 +88,7 @@ struct VectorGLTest: GL::OpenGLTester {
- Mesa Intel - Mesa Intel
- Mesa AMD - Mesa AMD
- Mesa llvmpipe
- SwiftShader ES2/ES3 - SwiftShader ES2/ES3
- ARM Mali (Huawei P10) ES2/ES3 - ARM Mali (Huawei P10) ES2/ES3
- WebGL 1 / 2 (on Mesa Intel) - WebGL 1 / 2 (on Mesa Intel)
@ -295,8 +296,8 @@ void VectorGLTest::renderDefaults2D() {
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences on edges, ARM Mali a bit more of /* SwiftShader has off-by-one differences on edges, ARM Mali a bit more of
them */ them, llvmpipe is off-by-two */
const Float maxThreshold = 1.0f, meanThreshold = 0.022f; const Float maxThreshold = 2.0f, meanThreshold = 0.071f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.359f; const Float maxThreshold = 17.0f, meanThreshold = 0.359f;
@ -342,8 +343,8 @@ void VectorGLTest::renderDefaults3D() {
#if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL))
/* SwiftShader has off-by-one differences on edges, ARM Mali a bit more of /* SwiftShader has off-by-one differences on edges, ARM Mali a bit more of
them */ them; llvmpipe is off-by-two */
const Float maxThreshold = 1.0f, meanThreshold = 0.022f; const Float maxThreshold = 2.0f, meanThreshold = 0.071f;
#else #else
/* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */ /* WebGL 1 doesn't have 8bit renderbuffer storage, so it's way worse */
const Float maxThreshold = 17.0f, meanThreshold = 0.359f; const Float maxThreshold = 17.0f, meanThreshold = 0.359f;

Loading…
Cancel
Save