Fix T79800: Split vertex size for grease pencil
Differential Revision: https://developer.blender.org/D8607
This commit is contained in:
parent
bdf43213b2
commit
017941057f
Notes:
blender-bot
2023-02-14 10:14:07 +01:00
Referenced by issue #79800, Gpencil. Grease Pencil Vertex Size in theme settings is ignored
|
@ -73,7 +73,7 @@ void main()
|
|||
}
|
||||
|
||||
#ifdef USE_POINTS
|
||||
gl_PointSize = sizeVertex * 2.0;
|
||||
gl_PointSize = sizeVertexGpencil * 2.0;
|
||||
|
||||
if (is_point_dimmed) {
|
||||
finalColor.rgb = clamp(colorUnselect.rgb + vec3(0.3), 0.0, 1.0);
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -117,8 +117,7 @@ layout(std140) uniform globalsBlock
|
|||
float sizeEdgeFix;
|
||||
float sizeFaceDot;
|
||||
float sizeChecker;
|
||||
|
||||
float pad_globalsBlock;
|
||||
float sizeVertexGpencil;
|
||||
};
|
||||
|
||||
#define sizeViewportInv (sizeViewport.zw)
|
||||
|
|
Loading…
Reference in New Issue