Skip to content

Commit

Permalink
fix bug when sinAngle is < 1. the value of expandWidth was too much:
Browse files Browse the repository at this point in the history
limit it to the default:  expandWidth = width * 0.5;
  • Loading branch information
mickae1 committed Jan 14, 2025
1 parent 0b40489 commit 72c42b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/engine/Source/Shaders/PolylineCommon.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, f
vec2 u = -thisSegmentForwardWC;
vec2 v = leftWC;
float sinAngle = abs(u.x * v.y - u.y * v.x);
expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 0.5);
}

vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
Expand Down

0 comments on commit 72c42b5

Please sign in to comment.