mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 23:08:47 +00:00
PixelShaderGen: Use integer math for z textures.
This commit is contained in:
parent
3a6389992e
commit
605b687af8
3 changed files with 20 additions and 24 deletions
|
@ -141,8 +141,8 @@ void PixelShaderManager::SetConstants()
|
|||
|
||||
if (s_bViewPortChanged)
|
||||
{
|
||||
constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
|
||||
constants.zbias[1][1] = xfregs.viewport.zRange / 16777216.0f;
|
||||
constants.zbias[1][0] = xfregs.viewport.farZ;
|
||||
constants.zbias[1][1] = xfregs.viewport.zRange;
|
||||
dirty = true;
|
||||
s_bViewPortChanged = false;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra
|
|||
|
||||
void PixelShaderManager::SetZTextureBias()
|
||||
{
|
||||
constants.zbias[1][3] = bpmem.ztex1.bias/16777215.0f;
|
||||
constants.zbias[1][3] = bpmem.ztex1.bias;
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
|
@ -242,18 +242,18 @@ void PixelShaderManager::SetZTextureTypeChanged()
|
|||
constants.zbias[0][0] = 0;
|
||||
constants.zbias[0][1] = 0;
|
||||
constants.zbias[0][2] = 0;
|
||||
constants.zbias[0][3] = 255.0f/16777215.0f;
|
||||
constants.zbias[0][3] = 1;
|
||||
break;
|
||||
case TEV_ZTEX_TYPE_U16:
|
||||
constants.zbias[0][0] = 255.0f/16777215.0f;
|
||||
constants.zbias[0][0] = 1;
|
||||
constants.zbias[0][1] = 0;
|
||||
constants.zbias[0][2] = 0;
|
||||
constants.zbias[0][3] = 65280.0f/16777215.0f;
|
||||
constants.zbias[0][3] = 256;
|
||||
break;
|
||||
case TEV_ZTEX_TYPE_U24:
|
||||
constants.zbias[0][0] = 16711680.0f/16777215.0f;
|
||||
constants.zbias[0][1] = 65280.0f/16777215.0f;
|
||||
constants.zbias[0][2] = 255.0f/16777215.0f;
|
||||
constants.zbias[0][0] = 65536;
|
||||
constants.zbias[0][1] = 256;
|
||||
constants.zbias[0][2] = 1;
|
||||
constants.zbias[0][3] = 0;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue