diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-08-18 14:40:21 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-08-18 16:13:53 +0300 |
commit | 017941057f8a36925de4d3d7ce6fd16338846bf1 (patch) | |
tree | 840919772ddf7f46088f1c73f67379737b243b5d /source/blender/draw/intern | |
parent | bdf43213b25d21528dfa89dc9aeaa41f8d92116e (diff) |
Fix T79800: Split vertex size for grease pencil
Differential Revision: https://developer.blender.org/D8607
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_common.c | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_common.h | 3 | ||||
-rw-r--r-- | source/blender/draw/intern/shaders/common_globals_lib.glsl | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index f0d73d5bb84..aac9af088de 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -187,6 +187,7 @@ void DRW_globals_update(void) /* M_SQRT2 to be at least the same size of the old square */ gb->sizeVertex = U.pixelsize * (max_ff(1.0f, UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f)); + gb->sizeVertexGpencil = U.pixelsize * UI_GetThemeValuef(TH_GP_VERTEX_SIZE); gb->sizeFaceDot = U.pixelsize * UI_GetThemeValuef(TH_FACEDOT_SIZE); gb->sizeEdge = U.pixelsize * (1.0f / 2.0f); /* TODO Theme */ gb->sizeEdgeFix = U.pixelsize * (0.5f + 2.0f * (2.0f * (gb->sizeEdge * (float)M_SQRT1_2))); diff --git a/source/blender/draw/intern/draw_common.h b/source/blender/draw/intern/draw_common.h index 6060dce47ac..d6402127e5e 100644 --- a/source/blender/draw/intern/draw_common.h +++ b/source/blender/draw/intern/draw_common.h @@ -150,8 +150,7 @@ typedef struct GlobalsUboStorage { float sizeObjectCenter, sizeLightCenter, sizeLightCircle, sizeLightCircleShadow; float sizeVertex, sizeEdge, sizeEdgeFix, sizeFaceDot; float sizeChecker; - - float pad_globalsBlock; + float sizeVertexGpencil; } GlobalsUboStorage; /* Keep in sync with globalsBlock in shaders */ BLI_STATIC_ASSERT_ALIGN(GlobalsUboStorage, 16) diff --git a/source/blender/draw/intern/shaders/common_globals_lib.glsl b/source/blender/draw/intern/shaders/common_globals_lib.glsl index 40a527a6ba4..bd1b1fb6f3a 100644 --- a/source/blender/draw/intern/shaders/common_globals_lib.glsl +++ b/source/blender/draw/intern/shaders/common_globals_lib.glsl @@ -117,8 +117,7 @@ layout(std140) uniform globalsBlock float sizeEdgeFix; float sizeFaceDot; float sizeChecker; - - float pad_globalsBlock; + float sizeVertexGpencil; }; #define sizeViewportInv (sizeViewport.zw) |