mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Subtracting an offset of 0.5 works on my nVidia and I have no idea why, this makes no sense.
This commit is contained in:
parent
160980ee2e
commit
dedd2b60e4
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ void GenerateVertexShader(int prim, u32 vertType, char *buffer, bool useHWTransf
|
|||
WRITE(p, "\nvec4 depthRoundZVP(vec4 v) {\n");
|
||||
WRITE(p, " float z = v.z / v.w;\n");
|
||||
WRITE(p, " z = z * u_depthRange.x + u_depthRange.y;\n");
|
||||
WRITE(p, " z = floor(z);\n");
|
||||
WRITE(p, " z = floor(z - 0.5);\n");
|
||||
WRITE(p, " z = (z - u_depthRange.y) / u_depthRange.x;\n");
|
||||
WRITE(p, " return vec4(v.x, v.y, z * v.w, v.w);\n");
|
||||
WRITE(p, "}\n\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue