Merge pull request #1235 from reicast/fh/alpha-pt-rounding-fix

Float math in alpha calculation causes some punch-through textures to…
This commit is contained in:
Abandoned Cart 2018-08-21 00:09:06 -04:00 committed by GitHub
commit 62837f4db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -336,7 +336,11 @@ void main() \n\
} \n\
#endif\n\
#if cp_AlphaTest == 1 \n\
if (cp_AlphaTestValue>color.a) discard;\n\
color.a = floor(color.a * 255.0 + 0.5) / 255.0; // Fixes noised cars in Jet Grind Radio \n\
if (cp_AlphaTestValue>color.a) \n\
discard;\n\
else \n\
color.a = 1.0; \n\
#endif \n\
//color.rgb=vec3(vtx_xyz.z/255.0);\n"
#ifndef GLES