mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 23:08:47 +00:00
If perspective divide is enabled and texture coordinate Z is 0 then leave texture coordinates alone. Fixes issue 3676.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6964 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fa95b7d89f
commit
d5e5730fef
5 changed files with 10 additions and 12 deletions
|
@ -257,14 +257,13 @@ void BuildBlock(s32 blockX, s32 blockY)
|
|||
// tex coords
|
||||
for (unsigned int i = 0; i < bpmem.genMode.numtexgens; i++)
|
||||
{
|
||||
float projection;
|
||||
float projection = invW;
|
||||
if (xfregs.texMtxInfo[i].projection)
|
||||
{
|
||||
float q = TexSlopes[i][2].GetValue(dx, dy) * invW;
|
||||
projection = invW / q;
|
||||
if (q != 0.0f)
|
||||
projection = invW / q;
|
||||
}
|
||||
else
|
||||
projection = invW;
|
||||
|
||||
pixel.Uv[i][0] = TexSlopes[i][0].GetValue(dx, dy) * projection;
|
||||
pixel.Uv[i][1] = TexSlopes[i][1].GetValue(dx, dy) * projection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue