1.63 bug with enableLighting

1. A concise explanation of the problem you’re experiencing.

After upgrading nothing but the version to 1.63 there is now a globe within a globe in my app. Removing viewer.scene.globe.enableLighting = true; fixes the issue.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Go to sandcastle and rand the following:

var viewer = new Cesium.Viewer(‘cesiumContainer’);

viewer.scene.globe.enableLighting = true

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

Was using 1.62 and everything was working ok. Upgrading to 1.63 caused the attached screenshot.

Wow, thanks for reporting this. This is definitely a bug. It’s caused by I think an inconsistent pixel ratio. This PR changed it so that the shaders would use the correct scale based on the resolution: https://github.com/AnalyticalGraphicsInc/cesium/pull/8318

But I think it might have missed something. I’m going to see if I can put together a quick fix for this. In the mean time you can work around it in your application by setting:

viewer.resolutionScale = 1.0 / window.devicePixelRatio;


This brings the resolutionScale back to the old behavior as of 1.61 (see the explanation of this change here: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CHANGES.md#additions-tada-2).