Corrected issue with MSAA

This commit is contained in:
Ray 2018-11-19 09:23:38 +01:00
parent de02f14283
commit fcb2b74342

View file

@ -716,7 +716,9 @@ static Texture2D GetShapesTexture(void)
{
#if defined(SUPPORT_FONT_TEXTURE)
texShapes = GetFontDefault().texture; // Use font texture white character
recTexShapes = GetFontDefault().chars[95].rec;
Rectangle rec = GetFontDefault().chars[95].rec;
// NOTE: We setup a 1px padding on char rectangle to avoid texture bleeding on MSAA filtering
recTexShapes = (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 };
#else
texShapes = GetTextureDefault(); // Use default white texture
recTexShapes = { 0.0f, 0.0f, 1.0f, 1.0f };