# Day/Night overlay for 2-d and 3-d

**URL:** <https://community.cesium.com/t/day-night-overlay-for-2-d-and-3-d/3549>\
**Category:** CesiumJS\
**Created:** [January 12, 2016, 2:22pm UTC](https://community.cesium.com/t/day-night-overlay-for-2-d-and-3-d/3549 "2016-01-12T14:22:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![K\_Akins](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@K\_Akins](https://community.cesium.com/u/K_Akins)\
**Post date:** [January 12, 2016, 2:22pm UTC](https://community.cesium.com/t/day-night-overlay-for-2-d-and-3-d/3549/1 "2016-01-12T14:22:10Z")

</div>

Good morning.

I need to be able to show the location of the solar terminator (at a minimum) and preferably have a differential shading between sunlit and un-sunlit regions of both our 2-D and 3-D Cesium visualizations. We are using an imageryProvider for the base layer, so the overlay would need to be above this.

I see reference in this topic ([https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=http%3A%2F%2Fcesiumjs.org%2Fforum.html#!searchin/cesium-dev/shading/cesium-dev/TpRCiZIhN0Q/grcgYVfWDmYJ](https://groups.google.com/forum/embed/?place=forum/cesium-dev&showsearch=true&showpopout=true&hideforumtitle=true&fragments=true&parenturl=http%3A%2F%2Fcesiumjs.org%2Fforum.html#!searchin/cesium-dev/shading/cesium-dev/TpRCiZIhN0Q/grcgYVfWDmYJ)) to having such shading added it in B22 in 2013, but I can’t find any reference in the API to enable this if the feature still exists.

Any assistance would be appreciated.

Thanks,

–k

---

<div class="post-metadata">

**Author:** ![Mati\_O](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mati\_O](https://community.cesium.com/u/Mati_O)\
**Post date:** [January 13, 2016, 7:29am UTC](https://community.cesium.com/t/day-night-overlay-for-2-d-and-3-d/3549/2 "2016-01-13T07:29:21Z")

</div>

If I understand correctly, this is what you want to achieve

[![](https://lh3.googleusercontent.com/-W3vZ7QeYlDM/VpX8mXmsO2I/AAAAAAAAESw/rD9noadOkDM/s320/cesium-s.png)](https://lh3.googleusercontent.com/-W3vZ7QeYlDM/VpX8mXmsO2I/AAAAAAAAESw/rD9noadOkDM/s1600/cesium-s.png)

Here you go :  
var viewer = new Cesium.Viewer(‘cesiumContainer’);  
viewer.scene.globe.enableLighting = true;

``

I am using [enableLighting](http://cesiumjs.org/Cesium/Build/Documentation/Globe.html#enableLighting)property on the globe
