Skip to content

Commit

Permalink
[d3d9] Divide projected textures by w if ProjectedCount is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
K0bin authored and misyltoad committed Sep 4, 2023
1 parent ce2f9f3 commit 9e26964
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/d3d9/d3d9_fixed_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9e26964

Please sign in to comment.