By default terrain shadows are Cesium.ShadowMode.RECEIVE_ONLY, which means you don’t need to set it to ENABLED unless you want terrain to cast shadows onto itself (good with really hilly terrain, but not needed for flat areas). Besides that you also need to set:
viewer.shadows = true;
To turn shadowing on for the entire engine.
The problem with your CZML is that it should be “shadows” : “ENABLED”. In CZML you need to use the name of the enum rather than the number value.
Ah ok. Right now the shadow system is tuned for views that are closer to the earth like primitives/models that are close to the ground. It works on a range of about 5000 meters which views from space usually exceed. We may get around to supporting views like this eventually.
That was just an example I posted here. I tried with smaller polygon. But does not seem to work. No shadow is visible if I load data from CZML. Here is my example:
That example works for me, check out the attached screenshot. Shadows are affected by the sun position so it’s possible the sun was below the horizon and so there weren’t any shadows. Try adjusting the time slider and let me know how that goes. It’s also possible there’s some latent issue that is only affecting your machine.