Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-05-02 09:44:24 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-02 21:49:38 +0300
commit0ea329d32de1f4a137880941f648a97b3ad7874f (patch)
tree741e020b06e3b8adf774e1261c73fc6d01ef3964 /source/blender/draw/intern/draw_armature.c
parent73cb83d48fb9c81e064eedf6b12551c0a85d7536 (diff)
Armature: Envelope: Revisit envelope drawing again.
Past shader was too slow and had bad artifacts. This method is much simpler and eficient and only exhibit some popping when the raidus of the head/tail is changed.
Diffstat (limited to 'source/blender/draw/intern/draw_armature.c')
-rw-r--r--source/blender/draw/intern/draw_armature.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c
index 5a3c03d5be2..ec2751d661b 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -189,12 +189,6 @@ static void drw_shgroup_bone_envelope_distance(
head_sphere[3] += *distance;
tail_sphere[3] = *radius_tail;
tail_sphere[3] += *distance;
-
- /* Shader transform is nicer if tail is the biggest. */
- if (*radius_head > *radius_tail) {
- swap_v4_v4(head_sphere, tail_sphere);
- }
-
DRW_shgroup_call_dynamic_add(g_data.bone_envelope_distance, head_sphere, tail_sphere, color, final_bonemat[0]);
}
}
@@ -232,12 +226,6 @@ static void drw_shgroup_bone_envelope(
/* Draw Body */
float tmp_sphere[4];
float len = len_v3v3(tail_sphere, head_sphere);
-
- /* Shader transform is nicer if tail is the biggest. */
- if (*radius_head > *radius_tail) {
- swap_v4_v4(head_sphere, tail_sphere);
- }
-
float fac_head = (len - head_sphere[3]) / len;
float fac_tail = (len - tail_sphere[3]) / len;