mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
some work on zscale and zoffset, don't know if this is correct but at least it seem to fix one or two games.
thanks a lot to chaoscode he make possible to test this on nvidia. please test this a lot and give me feedback :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4468 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -610,9 +610,9 @@ void UpdateViewport()
|
||||
|
||||
vp.Width = (int)ceil(abs((int)(2 * xfregs.rawViewport[0])) * MValueX);
|
||||
vp.Height = (int)ceil(abs((int)(2 * xfregs.rawViewport[1])) * MValueY);
|
||||
|
||||
vp.MinZ = (xfregs.rawViewport[5] - xfregs.rawViewport[2]) / 16777215.0f;
|
||||
vp.MaxZ = xfregs.rawViewport[5] / 16777215.0f;
|
||||
//new depth equation , don't know if is correct but...
|
||||
vp.MinZ = (xfregs.rawViewport[5] - xfregs.rawViewport[2]+xfregs.Zoffset) / xfregs.ZScale;
|
||||
vp.MaxZ = (xfregs.rawViewport[5] + xfregs.Zoffset) / xfregs.ZScale;
|
||||
|
||||
// This seems to happen a lot - the above calc is probably wrong.
|
||||
if (vp.MinZ < 0.0f) vp.MinZ = 0.0f;
|
||||
|
Reference in New Issue
Block a user