CesiumGS / CesiumGS/cesium

Order Independent Translucency not blending properly

Open
#4,170 7 comments 0 reactions 0 assignees View on GitHub
category - graphics type - bug
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);
```

![oit_bug](https://cloud.githubusercontent.com/assets/1686028/17376226/a3b3dbea-5982-11e6-9bd8-63afa32c4f31.jpg)

What it should look like:
![oit_correct](https://cloud.githubusercontent.com/assets/1686028/17376198/851b9c2c-5982-11e6-94d1-e1e90eec27f9.jpg)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.