From 2caa3c9f8804415f4cb328907daf7988eac5c411 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 10 Feb 2020 15:19:53 +0000 Subject: [PATCH] [tests] Add alpha test > 255 to this triangle mess --- tests/d3d9/test_d3d9_triangle.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/d3d9/test_d3d9_triangle.cpp b/tests/d3d9/test_d3d9_triangle.cpp index db2f7172..c7b7cd49 100644 --- a/tests/d3d9/test_d3d9_triangle.cpp +++ b/tests/d3d9/test_d3d9_triangle.cpp @@ -46,6 +46,7 @@ PS_OUTPUT main( VS_OUTPUT IN ) { PS_OUTPUT OUT; OUT.Colour = tex2D(g_texDepth, float2(0, 0)); + OUT.Colour = 1.0; return OUT; } @@ -271,6 +272,10 @@ public: D3DLOCKED_RECT rect; status = myCopyThing->LockRect(0, &rect, nullptr, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK); + + m_device->SetRenderState(D3DRS_ALPHAREF, 256 + 255); + m_device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_LESSEQUAL); + m_device->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); } void run() {