CesiumGS / CesiumGS/cesium

Visible GroundPrimitive seam at IDL and Prime Meridian

Open
#4,746 9 comments 1 reaction 1 assignee Claimed by @likangning93 View on GitHub
category - graphics category - polygons/geometry type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

![split](https://cloud.githubusercontent.com/assets/3451886/21119583/40c51884-c091-11e6-891b-29c3737f3cc5.gif)

For `GroundPrimitives`, when the geometry is sufficiently large, there's a weird artifact at `longitude = 0` where we split into east and west hemispheres in `GeometryPipeline.splitLongitudeTriangles`.
(The same thing will happen across the IDL if you flip the east and west coordinates in the example below)

``` javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var rectangle = Cesium.Rectangle.fromDegrees(-125.0, -30.0, 125.0, 30.0);

var primitive = viewer.scene.primitives.add(new Cesium.GroundPrimitive({
geometryInstances : [new Cesium.GeometryInstance({
geometry : new Cesium.RectangleGeometry({
rectangle : rectangle,
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.8))
}
})],
appearance : new Cesium.PerInstanceColorAppearance({
closed : true
})
}));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.