cesium icon indicating copy to clipboard operation
cesium copied to clipboard

New atmosphere causes banding when combined with bloom post processing

Open mramato opened this issue 3 years ago • 3 comments

We have an app that has noticeable banding artifacts after upgrading to the latest CesiumJS.

image

I tracked this back to having bloom enabled with a stepSize other than 1

const viewer = new Cesium.Viewer("cesiumContainer");

const bloom = viewer.scene.postProcessStages.bloom;
bloom.enabled = true;
bloom.uniforms.stepSize = 7;

// Not needed, but makes it even worse and more noticeable
viewer.scene.highDynamicRange = true;

Screenshot_20220513_093214

This is also noticeable in the Post Processing Sandcastle Example: https://sandcastle.cesium.com/index.html?src=Bloom.html&label=Post%20Processing

Screenshot_20220513_093355

mramato avatar May 13 '22 13:05 mramato

I will take a deeper look into why this is happening, but as a first step, I noticed that the banding was visible with the older atmosphere too - past a certain stepSize. Seems like the threshold for that to visually appear is lower with the new atmosphere.

1.92 1.93
1-92-Bloom 1-93-Bloom

sanjeetsuhag avatar May 13 '22 15:05 sanjeetsuhag

@mramato Based on the findings above, seems like the banding was always an issue, if the stepSize was large enough - however, that threshold is just lower with the new colors of the atmosphere. Would reducing the stepSize be an option for you? If not, we'll probably have to revisit the implementation of the bloom filter.

sanjeetsuhag avatar May 16 '22 15:05 sanjeetsuhag

@sanjeetsuhag We can live with the issue for now or set step size to one. But I gree that it seems like bloom should be revisited at some point (so we should either write up a new issue or leave this open to do so).

mramato avatar May 16 '22 15:05 mramato