High CPU Usage with Polygons Filled with Color

I am experiencing high CPU usage when rendering multiple polygons with fill colors and opacity in Chrome. Specifically, when I plot around 50 polygons with fill colors using transparency (e.g., Cesium.Color.RED.withAlpha(0.2)), the CPU usage spikes to over 40% on my machine. I am using Cesium World Terrain as the terrain provider.

However, I do not experience this issue when running similar code in Cesium Sandcastle. The behavior seems specific to my application, and I’m wondering the reason behind it.

When the polygons are rendered without fill colors or with no transparency, the CPU usage drops significantly. I’m curious why filling polygons with colors that include opacity causes such a high CPU load, and if there are any optimizations or settings I should consider to alleviate this issue.

Hi @Abhishek_Aneja, one similar report I’m seeing is GeoJSON polygon breaks rendering (GeoJsonDataSource) · Issue #11269 · CesiumGS/cesium · GitHub. Are your polygons clamped to ground?

The inconsistency between Sandcastle and your application makes it harder to debug. One possible thing to look at: is your app trying to composite a transparent image from Cesium over something else?