mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-14 02:50:56 +00:00
Round depth in the fragment shader. Simpler alternative to #7920 but will not work on ES 2.0, and will in many cases be slower.
So possibly this could be an option for modern devices, and possibly for games that #7920 can't fix.
This commit is contained in:
parent
608117085a
commit
fecc825e66
@ -1003,6 +1003,13 @@ void GenerateFragmentShader(char *buffer) {
|
||||
WRITE(p, " %s = vec4(1,0,1,1);\n", fragColor0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (true) {
|
||||
WRITE(p, " highp float z = gl_FragCoord.z;\n");
|
||||
WRITE(p, " z = (1.0/65535.0) * floor(z * 65535.0);\n");
|
||||
WRITE(p, " gl_FragDepth = z;\n");
|
||||
}
|
||||
|
||||
WRITE(p, "}\n");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user