From 9e26964a96a1811b3c6bb9af71e1d3a6a4ce778c Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Wed, 23 Aug 2023 18:20:14 +0200 Subject: [d3d9] Divide projected textures by w if ProjectedCount is 0 --- src/d3d9/d3d9_fixed_function.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/d3d9/d3d9_fixed_function.cpp b/src/d3d9/d3d9_fixed_function.cpp index 5581bfa1..099985f0 100644 --- a/src/d3d9/d3d9_fixed_function.cpp +++ b/src/d3d9/d3d9_fixed_function.cpp @@ -1809,8 +1809,9 @@ namespace dxvk { texcoord, texcoord, texcoordCnt, indices.data()); uint32_t projIdx = m_fsKey.Stages[i].Contents.ProjectedCount; - if (projIdx == 0 || projIdx > texcoordCnt) - projIdx = texcoordCnt; + if (projIdx == 0 || projIdx > texcoordCnt) { + projIdx = 4; // Always use w if ProjectedCount is 0. + } --projIdx; uint32_t projValue = 0; -- cgit v1.2.3