Blender Git Loki
Git Commits -> Revision 9a79178
Revision 9a79178 by Clément Foucault (master) May 8, 2018, 10:18 (GMT) |
Armature: Add back Stick bone draw type. The actual code is a bit convoluted but allows good and "pseudo efficient" drawing. (pseudo efficient because rendering instances with that amount of vertices is really inneficient. We should go full procedural but need to have bufferTexture implemented first) But drawing speed is not a bottleneck here and it's already a million time less crappy than the old (2.79) immediate mode method. Instead of drawing actual wires with different width we render a triangle fan batch (containing 3 fans: bone, head, tail) which is then oriented in screen space to the bone direction. We then interpolate a float value accross vertices giving us a nice blend factor to blend the colors and gives us really smooth interpolation inside the bone. The outside edge still being geometry will be antialiased by MSAA if enabled. |
Commit Details:
Full Hash: 9a79178c2eb79e724077d38cd2dd964d0b6ca0ea
Parent Commit: d8706f5
Lines Changed: +280, -4
2 Added Paths:
/source/blender/draw/modes/shaders/armature_stick_frag.glsl (+13, -0) (View)
/source/blender/draw/modes/shaders/armature_stick_vert.glsl (+88, -0) (View)
/source/blender/draw/modes/shaders/armature_stick_vert.glsl (+88, -0) (View)
6 Modified Paths:
/source/blender/draw/CMakeLists.txt (+2, -0) (Diff)
/source/blender/draw/intern/draw_armature.c (+70, -4) (Diff)
/source/blender/draw/intern/draw_cache.c (+77, -0) (Diff)
/source/blender/draw/intern/draw_cache.h (+1, -0) (Diff)
/source/blender/draw/intern/draw_common.c (+28, -0) (Diff)
/source/blender/draw/intern/draw_common.h (+1, -0) (Diff)
/source/blender/draw/intern/draw_armature.c (+70, -4) (Diff)
/source/blender/draw/intern/draw_cache.c (+77, -0) (Diff)
/source/blender/draw/intern/draw_cache.h (+1, -0) (Diff)
/source/blender/draw/intern/draw_common.c (+28, -0) (Diff)
/source/blender/draw/intern/draw_common.h (+1, -0) (Diff)