diff options
| author | Tony Wasserka <NeoBrainX@gmail.com> | 2013-11-23 20:58:24 +0100 |
|---|---|---|
| committer | Tony Wasserka <NeoBrainX@gmail.com> | 2014-03-14 22:31:31 +0100 |
| commit | 605b687af8a46cfb32e1a9599d3ddb47d2cdf02c (patch) | |
| tree | 5f4582cc9820b0270154060a7a7bea624b610d4c /Source/Core/VideoCommon/PixelShaderManager.cpp | |
| parent | 3a6389992e65df1609d3a200807b6a1f4c389808 (diff) | |
PixelShaderGen: Use integer math for z textures.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderManager.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp index 8999247f24..79ff607b82 100644 --- a/Source/Core/VideoCommon/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/PixelShaderManager.cpp @@ -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: |
