Merge pull request #9333 from Pokechu22/sw-always-divide-by-q

Software: Always divide the texture coordinates by q.
This commit is contained in:
Léo Lam 2021-02-13 13:24:18 +01:00 committed by GitHub
commit 2f85b80b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -228,12 +228,9 @@ static void BuildBlock(s32 blockX, s32 blockY)
for (unsigned int i = 0; i < bpmem.genMode.numtexgens; i++) for (unsigned int i = 0; i < bpmem.genMode.numtexgens; i++)
{ {
float projection = invW; float projection = invW;
if (xfmem.texMtxInfo[i].projection) float q = TexSlopes[i][2].GetValue(dx, dy) * invW;
{ if (q != 0.0f)
float q = TexSlopes[i][2].GetValue(dx, dy) * invW; projection = invW / q;
if (q != 0.0f)
projection = invW / q;
}
pixel.Uv[i][0] = TexSlopes[i][0].GetValue(dx, dy) * projection; pixel.Uv[i][0] = TexSlopes[i][0].GetValue(dx, dy) * projection;
pixel.Uv[i][1] = TexSlopes[i][1].GetValue(dx, dy) * projection; pixel.Uv[i][1] = TexSlopes[i][1].GetValue(dx, dy) * projection;