From c769b1a5533bb0fcf04452cde4d81dd77f7ae03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 6 May 2018 18:36:27 +0200 Subject: Armature: Add a special Pass for bone axes. In object mode, the axes are drawn like any other wire objects with depth test and depth write. Thus enabling MSAA to work but not their xray behaviour. In edit armature/pose mode, draw smooth line without depth testing. This produces wrong draw ordering problem but still gives the desired xray behaviour. We do it outside of the MSAA pass since the xray behaviour is not compatible with it. But we are drawing smoothed lines so no need for MSAA. The lines are 2px thick and improve readability. --- source/blender/draw/intern/draw_armature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/draw/intern/draw_armature.c') diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c index c4331f4ebdc..a0486233ddb 100644 --- a/source/blender/draw/intern/draw_armature.c +++ b/source/blender/draw/intern/draw_armature.c @@ -312,7 +312,7 @@ static void drw_shgroup_bone_point( static void drw_shgroup_bone_axes(const float (*bone_mat)[4], const float color[4]) { if (g_data.bone_axes == NULL) { - g_data.bone_axes = shgroup_instance_bone_axes(g_data.passes.bone_wire); + g_data.bone_axes = shgroup_instance_bone_axes(g_data.passes.bone_axes); } float final_bonemat[4][4]; mul_m4_m4m4(final_bonemat, g_data.ob->obmat, bone_mat); -- cgit v1.2.3