diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ClearTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ClearTest.cpp index 1f67e37de62..d703672e1b5 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ClearTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ClearTest.cpp @@ -21,7 +21,7 @@ // Clearing the render target fills it with the clear color from corner to corner. TEST_F(RenderingTest, Clear) { - const DWORD color = 0x102030; + const DWORD color = 0x603010; clear(color); capture("clear.png"); EXPECT_EQ(pixel(0, 0), color); diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_LaserTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_LaserTest.cpp index b09a03dc7d3..b6469e70354 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_LaserTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_LaserTest.cpp @@ -31,20 +31,20 @@ TEST_F(RenderingTest, Laser) return 0xFF000000 | brightness << 16 | brightness << 8 | brightness; }); - // A red beam from west to east and a blue one that crosses it on the way up. + // A green beam from west to east and a magenta one that crosses it on the way up. Vector3 eastWest[] = {Vector3(-6.0f, 0.0f, 0.0f), Vector3(6.0f, 0.0f, 0.0f)}; Vector3 diagonal[] = {Vector3(-5.0f, -3.0f, 0.0f), Vector3(5.0f, 3.0f, 2.0f)}; SegmentedLineClass *red = NEW_REF(SegmentedLineClass, ()); red->Set_Points(2, eastWest); - red->Set_Color(Vector3(1.0f, 0.2f, 0.1f)); + red->Set_Color(Vector3(0.2f, 1.0f, 0.2f)); SegmentedLineClass *blue = NEW_REF(SegmentedLineClass, ()); blue->Set_Points(2, diagonal); - blue->Set_Color(Vector3(0.2f, 0.4f, 1.0f)); + blue->Set_Color(Vector3(1.0f, 0.2f, 1.0f)); for (SegmentedLineClass *laser : {red, blue}) { laser->Set_Texture(glow); laser->Set_Shader(ShaderClass::_PresetAdditiveShader); - laser->Set_Width(0.8f); + laser->Set_Width(1.2f); } render({red, blue}); diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ParticlesTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ParticlesTest.cpp index aed0a621f44..d3db097f13b 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ParticlesTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_ParticlesTest.cpp @@ -37,7 +37,7 @@ TEST_F(RenderingTest, Particles) return 0xFF000000 | brightness << 16 | brightness << 8 | brightness; }); - // A ring of particles on the ground that turn from red to yellow and grow, around one in the middle. + // A ring of particles on the ground that turn from blue to cyan and grow, around one in the middle. constexpr int Count = 13; ShareBufferClass *locations = NEW_REF(ShareBufferClass, (Count, "ParticlesTest")); ShareBufferClass *colors = NEW_REF(ShareBufferClass, (Count, "ParticlesTest")); @@ -45,9 +45,9 @@ TEST_F(RenderingTest, Particles) for (int i = 0; i < Count; ++i) { const float angle = i * WWMATH_PI * 2.0f / (Count - 1); - const float radius = i == 0 ? 0.0f : 4.0f; + const float radius = i == 0 ? 0.0f : 3.0f; locations->Get_Array()[i] = Vector3(radius * cosf(angle), radius * sinf(angle), 0.0f); - colors->Get_Array()[i] = Vector4(1.0f, static_cast(i) / Count, 0.1f, 1.0f); + colors->Get_Array()[i] = Vector4(0.1f, static_cast(i) / Count, 1.0f, 1.0f); sizes->Get_Array()[i] = 1.0f + i * 0.1f; } diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DBlendingTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DBlendingTest.cpp index e6c9175ac4b..604c51569db 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DBlendingTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DBlendingTest.cpp @@ -29,22 +29,22 @@ TEST_F(RenderingTest, Render2DBlending) renderer.Set_Coordinate_Range(RectClass(0.0f, 0.0f, Width, Height)); renderer.Enable_Texturing(false); - // Half transparent red. + // Half transparent blue. renderer.Enable_Alpha(true); - renderer.Add_Quad(RectClass(16.0f, 16.0f, 112.0f, 240.0f), 0x80FF0000); + renderer.Add_Quad(RectClass(16.0f, 16.0f, 112.0f, 240.0f), 0x800000FF); renderer.Render(); - // Green added on top, partly over the red. + // Red added on top, partly over the blue. renderer.Reset(); renderer.Enable_Additive(true); - renderer.Add_Quad(RectClass(80.0f, 16.0f, 176.0f, 240.0f), 0xFF006000); + renderer.Add_Quad(RectClass(80.0f, 16.0f, 176.0f, 240.0f), 0xFF600000); renderer.Render(); - // Blue multiplied with what is below, partly over the green. + // Yellow multiplied with what is below, partly over the red. renderer.Reset(); *renderer.Get_Shader() = ShaderClass::_PresetMultiplicative2DShader; renderer.Enable_Texturing(false); - renderer.Add_Quad(RectClass(144.0f, 16.0f, 240.0f, 240.0f), 0xFF4080FF); + renderer.Add_Quad(RectClass(144.0f, 16.0f, 240.0f, 240.0f), 0xFFFFFF40); renderer.Render(); capture("render2d_blending.png"); diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DShapesTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DShapesTest.cpp index 4f0790c2c48..4c68d7c9f2b 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DShapesTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DShapesTest.cpp @@ -27,17 +27,17 @@ TEST_F(RenderingTest, Render2DShapes) renderer.Set_Coordinate_Range(RectClass(0.0f, 0.0f, Width, Height)); renderer.Enable_Texturing(false); - // A blue rectangle with a white border, an orange outline, a green line and a red to blue gradient. - renderer.Add_Rect(RectClass(16.0f, 16.0f, 112.0f, 112.0f), 4.0f, 0xFFFFFFFF, 0xFF2040C0); - renderer.Add_Outline(RectClass(144.0f, 16.0f, 240.0f, 112.0f), 2.0f, 0xFFFFC000); - renderer.Add_Line(Vector2(16.0f, 136.0f), Vector2(240.0f, 184.0f), 3.0f, 0xFF40FF40); - renderer.Add_Quad_HGradient(RectClass(16.0f, 208.0f, 240.0f, 240.0f), 0xFFFF0000, 0xFF0000FF); + // An orange rectangle with a green border, a cyan outline, a yellow line and a green to magenta gradient. + renderer.Add_Rect(RectClass(16.0f, 16.0f, 112.0f, 112.0f), 4.0f, 0xFF40FF40, 0xFFC04020); + renderer.Add_Outline(RectClass(144.0f, 16.0f, 240.0f, 112.0f), 2.0f, 0xFF00C0FF); + renderer.Add_Line(Vector2(16.0f, 136.0f), Vector2(240.0f, 184.0f), 3.0f, 0xFFFFFF40); + renderer.Add_Quad_HGradient(RectClass(16.0f, 208.0f, 240.0f, 240.0f), 0xFF00FF00, 0xFFFF00FF); renderer.Render(); capture("render2d_shapes.png"); // The fill and the border of the rectangle, and the inside and the edge of the outline. - EXPECT_EQ(pixel(64, 64), 0x2040C0); - EXPECT_EQ(pixel(17, 64), 0xFFFFFF); + EXPECT_EQ(pixel(64, 64), 0xC04020); + EXPECT_EQ(pixel(17, 64), 0x40FF40); EXPECT_EQ(pixel(192, 64), 0x000000); - EXPECT_EQ(pixel(145, 64), 0xFFC000); + EXPECT_EQ(pixel(145, 64), 0x00C0FF); } diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DTextureTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DTextureTest.cpp index ed34827d4bf..99d8eb9b4d4 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DTextureTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_Render2DTextureTest.cpp @@ -24,14 +24,14 @@ // linear filtering blends them, and transparent texels let the background show through. TEST_F(RenderingTest, Render2DTexture) { - const DWORD background = 0x204060; + const DWORD background = 0x402060; clear(background); - // A red and white checkerboard with a transparent top left quarter. + // A blue and white checkerboard with a transparent top left quarter. const auto checkerboard = [](UINT x, UINT y) -> DWORD { const DWORD alpha = (x < 4 && y < 4) ? 0x00000000 : 0xFF000000; - return alpha | (((x ^ y) & 1) ? 0xFFFFFF : 0xC02020); + return alpha | (((x ^ y) & 1) ? 0xFFFFFF : 0x2080C0); }; TextureClass *sharp = createTexture(8, 8, checkerboard); sharp->Get_Filter().Set_Min_Filter(TextureFilterClass::FILTER_TYPE_NONE); @@ -53,8 +53,8 @@ TEST_F(RenderingTest, Render2DTexture) REF_PTR_RELEASE(smooth); capture("render2d_texture.png"); - // Each texel covers 12 by 12 pixels. These are the centers of texel (5, 5), which is red, and texel (1, 1), + // Each texel covers 12 by 12 pixels. These are the centers of texel (5, 5), which is blue, and texel (1, 1), // which is transparent. - EXPECT_EQ(pixel(16 + 5 * 12 + 6, 64 + 5 * 12 + 6), 0xC02020); + EXPECT_EQ(pixel(16 + 5 * 12 + 6, 64 + 5 * 12 + 6), 0x2080C0); EXPECT_EQ(pixel(16 + 1 * 12 + 6, 64 + 1 * 12 + 6), background); } diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TextTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TextTest.cpp index f2de7a934f5..c844dfab4d8 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TextTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TextTest.cpp @@ -23,7 +23,7 @@ // including the drop shadow below the text. TEST_F(RenderingTest, Text) { - const DWORD background = 0x204060; + const DWORD background = 0x302020; clear(background); FontCharsClass *font = NEW_REF(FontCharsClass, ()); @@ -33,12 +33,12 @@ TEST_F(RenderingTest, Text) REF_PTR_RELEASE(font); // The black shadow first, then the text over it. - const WCHAR *text = L"Command & Conquer"; + const WCHAR *text = L"Generals Zero Hour"; sentence.Build_Sentence(text, nullptr, nullptr); sentence.Set_Location(Vector2(18.0f, 18.0f)); sentence.Draw_Sentence(0xFF000000); sentence.Set_Location(Vector2(16.0f, 16.0f)); - sentence.Draw_Sentence(0xFFFFC000); + sentence.Draw_Sentence(0xFF40C0FF); sentence.Render(); const Vector2 extents = sentence.Get_Text_Extents(text); @@ -48,7 +48,7 @@ TEST_F(RenderingTest, Text) bool found = false; for (UINT x = 16; x < 16 + extents.X; ++x) { - found |= pixel(x, 16 + static_cast(extents.Y) / 2) == 0xFFC000; + found |= pixel(x, 16 + static_cast(extents.Y) / 2) == 0x40C0FF; } EXPECT_TRUE(found); } diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TracerTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TracerTest.cpp index 27bcb9ba40b..ec6ee941f9c 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TracerTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TracerTest.cpp @@ -22,9 +22,9 @@ // Tracers are 3D lines, which W3DTracerDraw fades out by lowering their opacity. TEST_F(RenderingTest, Tracer) { - // A solid yellow tracer, crossed by a red one at half opacity. - Line3DClass *solid = NEW_REF(Line3DClass, (Vector3(-6.0f, -2.0f, 0.0f), Vector3(6.0f, 2.0f, 0.0f), 0.2f, 1.0f, 0.9f, 0.2f)); - Line3DClass *faded = NEW_REF(Line3DClass, (Vector3(-6.0f, 2.0f, 0.0f), Vector3(6.0f, -2.0f, 0.0f), 0.2f, 1.0f, 0.3f, 0.2f, 0.5f)); + // A solid cyan tracer, crossed by a magenta one at half opacity. + Line3DClass *solid = NEW_REF(Line3DClass, (Vector3(-6.0f, -2.0f, 0.0f), Vector3(6.0f, 2.0f, 0.0f), 0.3f, 0.2f, 0.9f, 1.0f)); + Line3DClass *faded = NEW_REF(Line3DClass, (Vector3(-6.0f, 2.0f, 0.0f), Vector3(6.0f, -2.0f, 0.0f), 0.3f, 1.0f, 0.2f, 1.0f, 0.5f)); render({solid, faded}); REF_PTR_RELEASE(solid); diff --git a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TriangleTest.cpp b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TriangleTest.cpp index 9e39fda6166..62c7c8d5188 100644 --- a/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TriangleTest.cpp +++ b/Tests/Google/Core/Rendering/EXAMPLE_TEMPORARY_TriangleTest.cpp @@ -21,12 +21,12 @@ // A triangle with a red, a green and a blue corner blends the corner colors across its area. TEST_F(RenderingTest, Triangle) { - const DWORD background = 0x102030; + const DWORD background = 0x301020; clear(background); drawTriangles({ - {128.0f, 32.0f, 0xff0000}, - {224.0f, 224.0f, 0x00ff00}, - {32.0f, 224.0f, 0x0000ff}, + {128.0f, 32.0f, 0x0000ff}, + {224.0f, 224.0f, 0xff0000}, + {32.0f, 224.0f, 0x00ff00}, }); capture("triangle.png"); // GPUs round the blended colors differently, so the exact colors are left to the image comparison of CI.