diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-12-09 17:31:14 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-12-14 15:58:24 +0300 |
commit | 45d797515fff2a40ea1bb1cf6fbc547aab9180a8 (patch) | |
tree | 1a4536c9c2aa2909ac3d4945d30ad1333dcf1838 /cura/ConvexHullNode.py | |
parent | 3e0a06e7ee074cbfbc937e23a6a98c568d3281fb (diff) |
Render Convex Hull below 0 to avoid z fighting artifacts
Diffstat (limited to 'cura/ConvexHullNode.py')
-rw-r--r-- | cura/ConvexHullNode.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index dc2b95756b..9932a19cfa 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -46,11 +46,11 @@ class ConvexHullNode(SceneNode): mesh = MeshData() if len(hull_points) > 3: center = (hull_points.min(0) + hull_points.max(0)) / 2.0 - mesh.addVertex(center[0], 0.1, center[1]) + mesh.addVertex(center[0], -0.1, center[1]) else: return None for point in hull_points: - mesh.addVertex(point[0], 0.1, point[1]) + mesh.addVertex(point[0], -0.1, point[1]) indices = [] for i in range(len(hull_points) - 1): indices.append([0, i + 1, i + 2]) @@ -69,9 +69,9 @@ class ConvexHullNode(SceneNode): self._shader.setUniformValue("u_color", self._color) if self.getParent(): - renderer.queueNode(self, transparent = True, shader = self._shader) + renderer.queueNode(self, transparent = True, shader = self._shader, backface_cull = True, sort = -8) if self._convex_hull_head_mesh: - renderer.queueNode(self, shader = self._shader, transparent = True, mesh = self._convex_hull_head_mesh) + renderer.queueNode(self, shader = self._shader, transparent = True, mesh = self._convex_hull_head_mesh, backface_cull = True, sort = -8) return True |