Fix #130992: Grease Pencil: Edit wire/vertex color usage fix

In legacy overlay the wire/vertex color used to draw grease pencil was
wrong, this means users can't effectively adjust grease pencil specific
wire colors. Currently this shader is used for both legacy and overlay
next, so this fix would be also beneficial down the line.

Pull Request: https://projects.blender.org/blender/blender/pulls/131023
This commit is contained in:
YimingWu
2024-11-27 10:13:20 +01:00
committed by YimingWu
parent d549436dfa
commit ca78cae828
2 changed files with 4 additions and 3 deletions

View File

@@ -47,8 +47,9 @@ void main()
finalColor = vec4(weight_to_rgb(selection), 1.0);
}
else {
vec4 use_color = useGreasePencil ? colorGpencilVertexSelect : colorVertexSelect;
finalColor = mix(colorWire, use_color, selection);
vec4 color_selected = useGreasePencil ? colorGpencilVertexSelect : colorVertexSelect;
vec4 color_not_selected = useGreasePencil ? colorGpencilVertex : colorVertex;
finalColor = mix(color_not_selected, color_selected, selection);
#if 1 /* Should be checking CURVES_POINT */
if (doStrokeEndpoints) {

View File

@@ -32,7 +32,7 @@ void main()
}
else {
vec4 use_color = useGreasePencil ? colorGpencilVertexSelect : colorVertexSelect;
finalColor = mix(colorWire, use_color, selection);
finalColor = mix(colorWireEdit, use_color, selection);
}
view_clipping_distances(world_pos);