CesiumGS / CesiumGS/cesium

GroundPrimitive texture coordinates incorrect across IDL

Open
#7,410 0 comments 0 reactions 0 assignees View on GitHub
category - polygons/geometry priority - high type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

![texturecoords](https://user-images.githubusercontent.com/3451886/49945529-1df90a80-febb-11e8-842f-006bf10dd500.gif)

This only happens with ground primitives with materials that cross the IDL.

```js
var viewer = new Cesium.Viewer('cesiumContainer', {scene3DOnly: true});

var rotation = Cesium.Math.toRadians(30);

function getRotationValue() {
rotation += 0.005;
return rotation;
}
viewer.entities.add({
name: 'Rotating rectangle with rotating texture coordinate',
rectangle: {
coordinates: Cesium.Rectangle.fromDegrees(-169.0, 30.0, -160.0, 40.0),
material: '../images/Cesium_Logo_Color.jpg',
rotation: new Cesium.CallbackProperty(getRotationValue, false),
stRotation: new Cesium.CallbackProperty(getRotationValue, false),
classificationType : Cesium.ClassificationType.TERRAIN
}
});

viewer.entities.add({
name: 'Rotating rectangle with rotating texture coordinate',
rectangle: {
coordinates: Cesium.Rectangle.fromDegrees(-179.0, 30.0, -170.0, 40.0),
material: '../images/Cesium_Logo_Color.jpg',
rotation: new Cesium.CallbackProperty(getRotationValue, false),
stRotation: new Cesium.CallbackProperty(getRotationValue, false),
classificationType : Cesium.ClassificationType.TERRAIN
}
});

viewer.zoomTo(viewer.entities);
```

cc @likangning93

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Cesium.Viewer reproduction with the two GroundPrimitive-backed rectangles and compare their texture coordinates as they cross the IDL. Trace the ground primitive rendering path for rotating materials; done means both rectangles render their textures correctly across the IDL without the shown distortion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.