Skip to content

Commit

Permalink
Prevent flickering for SectionLevel and Grid decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej730 committed Apr 9, 2023
1 parent 6c60d14 commit d3b0ee5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/blenderbim/blenderbim/bim/module/drawing/decoration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ class SectionLevelDecorator(LevelDecorator):
vec4 p;
dist = 0; // make sure dist is defined to prevent flickering
// start edge callout
if (t0 == 1u) {
vec4 head[4];
Expand Down Expand Up @@ -1518,6 +1519,7 @@ class GridDecorator(BaseDecorator):
+ """
#define CIRCLE_SIZE 16.0
#define DASH_SIZE 48.0
// dash pattern `---- ----------------`
#define DASH_PATTERN 0x03C0FFFFU
"""
)
Expand All @@ -1538,6 +1540,7 @@ class GridDecorator(BaseDecorator):
vec4 edge = p1w - p0w, dir = normalize(edge);
vec4 gap = dir * CIRCLE_SIZE * viewportDrawingScale;
dist = 0; // make sure dist is defined to prevent flickering
vec4 head[CIRCLE_SEGS];
circle_head(CIRCLE_SIZE * viewportDrawingScale, head);
Expand Down

0 comments on commit d3b0ee5

Please sign in to comment.