Add alphaCutoff shader flag;
@@ -97,6 +97,11 @@ const char* lovrShaderFragmentSuffix = ""
" colors(lovrColor, lovrDiffuseTexture, texCoord); \n"
"#else \n"
" lovrCanvas[0] = color(lovrColor, lovrDiffuseTexture, texCoord); \n"
+"#ifdef FLAG_alphaCutoff \n"
+" if (lovrCanvas[0].a < FLAG_alphaCutoff) { \n"
+" discard; \n"
+" } \n"
+"#endif \n"
#ifdef LOVR_WEBGL
" lovrCanvas[0].rgb = pow(lovrCanvas[0].rgb, vec3(.4545)); \n"
#endif
