[Bf-blender-cvs] [48adf903675] blender2.8: Matcap: Make matcap preview the same size as the other StudioLights
Clément Foucault
noreply at git.blender.org
Sat Jun 16 23:28:34 CEST 2018
Commit: 48adf903675ea3ac711c75de246634ae97691e71
Author: Clément Foucault
Date: Sat Jun 16 22:42:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB48adf903675ea3ac711c75de246634ae97691e71
Matcap: Make matcap preview the same size as the other StudioLights
===================================================================
M source/blender/blenkernel/intern/studiolight.c
===================================================================
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index 5ea08b66ac0..aa19fa6dfc8 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -672,10 +672,13 @@ static uint *studiolight_matcap_preview(StudioLight *sl, int icon_size, bool fli
int offset = 0;
ImBuf *ibuf = sl->equirectangular_radiance_buffer;
+ const float diameter = 0.95f;
for (int y = 0; y < icon_size; y++) {
fy = (y + 0.5f) / (float)icon_size;
+ fy = fy / diameter - (1.0f - diameter) / 2.0f;
for (int x = 0; x < icon_size; x++) {
fx = (x + 0.5f) / (float)icon_size;
+ fx = fx / diameter - (1.0f - diameter) / 2.0f;
if (flipped) {
fx = 1.0f - fx;
}
More information about the Bf-blender-cvs
mailing list