Order Independent Translucency not blending properly
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
There seems to be a problem with how OIT is blending translucent objects. In the following sandcastle example, the rectangles are almost completely opaque. They appear to blend properly with the globe, but when blending with other rectangles the underlying rectangles are visible when they shouldn't be.
``` javascript
Cesium.Math.setRandomNumberSeed(1234);
var viewer = new Cesium.Viewer('cesiumContainer', { infoBox : false });
var entities = viewer.entities;
var i;
var height;
for (i = 0; i < 5; ++i) {
height = 200000.0 * i;
entities.add({
rectangle : {
coordinates : Cesium.Rectangle.fromDegrees(-87.0, 37.0, -83.0, 42.0),
height : height,
material : Cesium.Color.fromRandom({alpha : .99})
}
});
}
viewer.zoomTo(viewer.entities);
```

What it should look like:

Contributor guide
Research direction
Start by running the sandcastle example from the issue with the shown rectangle entities and compare the translucency of overlapping rectangles with the globe. Trace the Order Independent Translucency rendering path and verify completion when overlapping translucent rectangles blend as shown in the expected image.
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