mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-22 08:44:51 +00:00
alpha test: fix typo, add back rounding offset
This commit is contained in:
parent
c543665513
commit
d76c45411d
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user