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.76k stars 3.46k forks source link

Primitives grayed out when panning over the Pacific in 2D #5544

Open dannytancs opened 7 years ago

dannytancs commented 7 years ago

Description

Primitives grayed out when panning over the Pacific in 2D.

Images of error

error2 error1

Code

        addCircle() {            
            var instance = new Cesium.GeometryInstance({
              geometry : new Cesium.CircleGeometry({
                  center : this.circle.center,
                  radius: this.circle.radius
              }),
            });
            var circlePrimitive = this.viewer.scene.primitives.add(new Cesium.Primitive({
              geometryInstances : instance,
              appearance : new Cesium.EllipsoidSurfaceAppearance({
                 material : new Cesium.Material({
                    fabric : {
                        type : 'Color',
                        uniforms : {
                            color : this.color
                        }
                    }
                })
               }),
              asynchronous: false
            }));
            return circlePrimitive
         }
pjcozzi commented 7 years ago

Thanks for the report and code example, @dannytanCS! I suspect this is related to #1825.

dannytancs commented 7 years ago

@pjcozzi I am not sure if it is lighting at the Pacific Ocean. The problem only occurs when I panned to the Pacific or the primitive is drawn on the Pacific. The primitive has no error in 3D or Columbus View. Do you have an idea on when this issue might get fixed?

pjcozzi commented 7 years ago

If it's not lighting, this could be related to the translucency. Have you tried making the circles opaque or disable OIT when constructing Cesium.Viewer by setting orderIndependentTranslucency to false?

As for timing, the team is committed to other things right now but we would welcome your help narrowing this down or contributing a fix. See CONTRIBUTING.md if you want to learn more about that.

dannytancs commented 7 years ago

@pjcozzi Thanks. By setting orderIndependentTranslucency to false , the graying out issue was solved. However, I can still see the lighting as an issue; the circle becomes darker as I move away from it.

pjcozzi commented 7 years ago

Thanks @dannytanCS, I'm going to re-open this as a potential OIT issue (or maybe driver).