diff --git a/gltext.h b/gltext.h index 8ea680f..549137e 100644 --- a/gltext.h +++ b/gltext.h @@ -859,7 +859,9 @@ static const GLchar* _gltText2DFragmentShaderSource = "\n" "void main()\n" "{\n" -" fragColor = texture(diffuse, fTexCoord) * color;\n" +" fragColor = texture(diffuse, fTexCoord);\n" +" if(fragColor.a<0.5 || length(fragColor.rgb) < 0.5){discard;}\n" +" fragColor *= color;" "}\n"; GLT_API GLboolean _gltCreateText2DShader(void) @@ -1336,4 +1338,4 @@ GLT_API GLboolean _gltCreateText2DFontTexture(void) } #endif -#endif \ No newline at end of file +#endif