mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 03:03:50 +01:00
alpha test: fix typo, add back rounding offset
This commit is contained in:
1 parent
c543665513
commit
d76c45411d
1 file changed
+2
-2
@@ -202,10 +202,10 @@ void GenerateFragmentShader(char *buffer) {
|
||||
}
|
||||
|
||||
if (enableAlphaTest) {
|
||||
WRITE(p, "float roundTo255th(in float x) { return x - fract(x * 255.0) * (1.0 / 255.0); }\n");
|
||||
WRITE(p, "float roundTo255th(in float x) { float y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n");
|
||||
}
|
||||
if (enableColorTest) {
|
||||
WRITE(p, "float roundTo255thv(in vec3 x) { return x - fract(x * 255.0) * (1.0 / 255.0); }\n");
|
||||
WRITE(p, "vec3 roundTo255thv(in vec3 x) { vec3 y = x + (0.5/255.0); return y - fract(y * 255.0) * (1.0 / 255.0); }\n");
|
||||
}
|
||||
|
||||
WRITE(p, "void main() {\n");
|
||||
|
||||
Reference in new issue
Block a user