mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
Try to do Z textures better. Z texturing does not work if early z or no z update. Corrected the Z texture bias used on 8 and 16 bit textures.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4596 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c9f5521d26
commit
6e7395cef1
3 changed files with 27 additions and 22 deletions
|
@ -676,10 +676,10 @@ void Tev::Draw()
|
|||
// z texture
|
||||
if (bpmem.ztex2.op)
|
||||
{
|
||||
s32 ztex = bpmem.ztex1.bias;
|
||||
u32 ztex = bpmem.ztex1.bias;
|
||||
switch (bpmem.ztex2.type) {
|
||||
case 0: // 8 bit
|
||||
ztex += TexColor[RED_C];
|
||||
ztex += TexColor[ALP_C];
|
||||
break;
|
||||
case 1: // 16 bit
|
||||
ztex += TexColor[ALP_C] << 8 | TexColor[RED_C];
|
||||
|
@ -689,14 +689,10 @@ void Tev::Draw()
|
|||
break;
|
||||
}
|
||||
|
||||
switch (bpmem.ztex2.op) {
|
||||
case ZTEXTURE_ADD:
|
||||
Position[2] += ztex;
|
||||
break;
|
||||
case ZTEXTURE_REPLACE:
|
||||
Position[2] = ztex;
|
||||
break;
|
||||
}
|
||||
if (bpmem.ztex2.op == ZTEXTURE_ADD)
|
||||
ztex += Position[2];
|
||||
|
||||
Position[2] = ztex & 0x00ffffff;
|
||||
}
|
||||
|
||||
if (!bpmem.zcontrol.zcomploc && bpmem.zmode.testenable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue