diff --git a/filament/test/filament_rendering_test.cpp b/filament/test/filament_rendering_test.cpp index f9ed69854d..4c11072489 100644 --- a/filament/test/filament_rendering_test.cpp +++ b/filament/test/filament_rendering_test.cpp @@ -114,7 +114,9 @@ private: }; TEST_F(RenderingTest, ClearRed) { - mSkybox->setColor(LinearColorA{1, 0, 0, 1}); + // We need to clear red to >1 here to ensure a tonemapped value of 255 regardless of LUT + // precision. + mSkybox->setColor({ 2.0f, 0.0f, 0.0f, 1.0f }); mView->setDithering(View::Dithering::NONE); runTest([this](uint8_t const* rgba, uint32_t width, uint32_t height) { EXPECT_EQ(rgba[0], 0xff); @@ -125,7 +127,9 @@ TEST_F(RenderingTest, ClearRed) { } TEST_F(RenderingTest, ClearGreen) { - mSkybox->setColor(LinearColorA{0, 1, 0, 1}); + // We need to clear green to >1 here to ensure a tonemapped value of 255 regardless of LUT + // precision. + mSkybox->setColor({ 0.0f, 2.0f, 0.0f, 1.0f }); mView->setDithering(View::Dithering::NONE); runTest([this](uint8_t const* rgba, uint32_t width, uint32_t height) { EXPECT_EQ(rgba[0], 0);