Overlapping image material z-fighting bug
- Dominant language
- JavaScript
- Stars
- 15.8k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/EKRqbL2TJJU

This problem doesn't happen in 2D or for polygons with a PerInstanceColorMaterial
``` javascript
var czml = [{
"id" : "document",
"name" : "CZML Geometries: Polygon",
"version" : "1.0"
}, {
"polygon" : {
"positions" : {
"cartographicDegrees" : [
-108.0, 25.0, 0,
-100.0, 27.0, 0,
-100.0, 32.0, 0,
-108.0, 30.0, 0
]
},
"height": 0,
"material" : {
"image": {
"image": { "uri": "../images/Cesium_Logo_Color.jpg" }
}
}
}
},{
"polygon" : {
"positions" : {
"cartographicDegrees" : [
-109.0, 26.0, 0,
-101.0, 28.0, 0,
-101.0, 33.0, 0,
-109.0, 31.0, 0
]
},
"height": 0,
"material" : {
"image": {
"image": { "uri": "../images/Cesium_Logo_Color.jpg" }
}
}
}
}];
var viewer = new Cesium.Viewer('cesiumContainer');
var dataSource = Cesium.CzmlDataSource.load(czml);
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);
```
Contributor guide
Research direction
Start by running the supplied Cesium.Viewer and CzmlDataSource.load reproduction with the two overlapping textured polygons, then compare it with 2D and PerInstanceColorMaterial cases. Trace the polygon rendering path from the viewer and determine how completion should be verified: overlapping image-material polygons no longer visibly z-fight.
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