CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.93k stars 3.48k forks source link

HDR hits the background color #7732

Open hpinkos opened 5 years ago

hpinkos commented 5 years ago

image

I want the globe on a white background, but if highDynamicRange is enabled the background is not white.

var viewer = new Cesium.Viewer('cesiumContainer', {
    skyBox: false
});
viewer.scene.backgroundColor = Cesium.Color.clone(Cesium.Color.WHITE);
//viewer.scene.highDynamicRange = false;
mramato commented 5 years ago

FYI, a work around here would be to use a transparent background and put it on a div with a white background.

emackey commented 5 years ago

Seems like it would be better to avoid tone-mapping the background color, if possible. That, or the background color should be able to be specified as an HDR color value, not just a simple color.

OmarShehata commented 5 years ago

Whatever solution we come up here we might need to have a way of applying to imagery layers as well. Same kind of issue brought up here https://github.com/AnalyticalGraphicsInc/cesium/issues/7931. The imagery layer is darker than it should be in CesiumJS due to HDR:

dim imagery

hpinkos commented 5 years ago

@OmarShehata I think using HDR just probably isn't appropriate for that kind of vector imagery