From 3725d82cee97b980e514aed1b226deb91aae9fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 8 Apr 2018 01:00:55 +0200 Subject: BLF: Opti: More clever sampling for blured glyphs. Reduce the number of sampled required for blurring by using filtered texture samples. This changes the result a bit but it is not noticable. --- source/blender/blenfont/intern/blf_glyph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenfont/intern/blf_glyph.c') diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 03d5b3ea07f..ad7e482f8e0 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -240,7 +240,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state = gc->textures[gc->texture_current])); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, gc->p2_width, gc->p2_height, 0, GL_RED, GL_UNSIGNED_BYTE, NULL); } -- cgit v1.2.3