From 43593e846bbed183a54ee1dae1b76f3f8c4be9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 11 Jul 2018 19:01:12 +0200 Subject: Matcap: Fix missing pixel on preview icons --- source/blender/blenkernel/intern/studiolight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/studiolight.c') diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index 200c50e5c23..5381d2be691 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -1037,7 +1037,7 @@ static void studiolight_matcap_preview(uint *icon_buffer, StudioLight *sl, bool if (flipped) { fx = 1.0f - fx; } - nearest_interpolation_color(ibuf, NULL, color, fx * ibuf->x, fy * ibuf->y); + nearest_interpolation_color(ibuf, NULL, color, fx * ibuf->x - 1.0f, fy * ibuf->y - 1.0f); uint alphamask = alpha_circle_mask(fx, fy, 0.5f - pixel_size, 0.5f); -- cgit v1.2.3