[Bf-blender-cvs] [fdce78c9362] blender2.8: Armature: Fix outline jitter in orthographic mode
Clément Foucault
noreply at git.blender.org
Wed Aug 22 13:51:23 CEST 2018
Commit: fdce78c9362a52086bd3d8591b5013cfaf5196f2
Author: Clément Foucault
Date: Tue Aug 21 17:35:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBfdce78c9362a52086bd3d8591b5013cfaf5196f2
Armature: Fix outline jitter in orthographic mode
===================================================================
M source/blender/draw/modes/shaders/armature_shape_outline_geom.glsl
===================================================================
diff --git a/source/blender/draw/modes/shaders/armature_shape_outline_geom.glsl b/source/blender/draw/modes/shaders/armature_shape_outline_geom.glsl
index 91468bf920a..bcfa097b277 100644
--- a/source/blender/draw/modes/shaders/armature_shape_outline_geom.glsl
+++ b/source/blender/draw/modes/shaders/armature_shape_outline_geom.glsl
@@ -64,10 +64,14 @@ void main(void)
float fac0 = dot(view_vec, n0);
float fac3 = dot(view_vec, n3);
- /* If both adjacent verts are facing the camera the same way,
- * then it isn't an outline edge. */
- if (sign(fac0) == sign(fac3))
- return;
+ /* If one of the face is perpendicular to the view,
+ * consider it and outline edge. */
+ if (abs(fac0) > 1e-5 && abs(fac3) > 1e-5) {
+ /* If both adjacent verts are facing the camera the same way,
+ * then it isn't an outline edge. */
+ if (sign(fac0) == sign(fac3))
+ return;
+ }
/* Don't outline if concave edge. */
if (dot(n0, v13) > 0.0001)
More information about the Bf-blender-cvs
mailing list