# Possible bug when switching between 2D and 3D when terrainProvider has been set

**URL:** <https://community.cesium.com/t/possible-bug-when-switching-between-2d-and-3d-when-terrainprovider-has-been-set/2690>\
**Category:** CesiumJS\
**Created:** [June 25, 2015, 1:45am UTC](https://community.cesium.com/t/possible-bug-when-switching-between-2d-and-3d-when-terrainprovider-has-been-set/2690 "2015-06-25T01:45:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Mills](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_mills/32/2185_2.png) [@Scott\_Mills](https://community.cesium.com/u/Scott_Mills)\
**Post date:** [June 25, 2015, 1:45am UTC](https://community.cesium.com/t/possible-bug-when-switching-between-2d-and-3d-when-terrainprovider-has-been-set/2690/1 "2015-06-25T01:45:01Z")

</div>

Hi guys,

I just noticed that if a terrainProvider is set and you start in the SCENE2D SceneMode, then switch to SCENE3D the globe has serious artifacts when zoomed out. I am not sure if this is a bug, or I am doing something wrong. I've tried it on multiple computers/operating systems/browsers (Windows 7 (Chrome, IE8), OSX 10.10 (Chrome, Safari)).

Screenshot of issue: [http://i.imgur.com/L3gx0E0.png](http://i.imgur.com/L3gx0E0.png)

Steps to reproduce:  
1. Load Hello World: [https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases](https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases)

2. Paste in the following code and run:  
var viewer = new Cesium.Viewer('cesiumContainer',{  
&nbsp;&nbsp;&nbsp;&nbsp;sceneMode: Cesium.SceneMode.SCENE2D});

var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({  
&nbsp;&nbsp;&nbsp;&nbsp;url : '[//assets.agi.com/stk-terrain/world](https://assets.agi.com/stk-terrain/world)',  
&nbsp;&nbsp;&nbsp;&nbsp;requestWaterMask : true,  
&nbsp;&nbsp;&nbsp;&nbsp;requestVertexNormals : true  
});  
viewer.terrainProvider = cesiumTerrainProviderMeshes;

3. Change sceneMode via the normal UI button to 3D and spin the planet around. You'll see obvious lines/glitches all over the planet as you spin.

---

<div class="post-metadata">

**Author:** ![Denver](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Denver](https://community.cesium.com/u/Denver)\
**Post date:** [June 25, 2015, 2:42am UTC](https://community.cesium.com/t/possible-bug-when-switching-between-2d-and-3d-when-terrainprovider-has-been-set/2690/2 "2015-06-25T02:42:05Z")

</div>

Can confirm on Chrome 43.

---

<div class="post-metadata">

**Author:** ![Michael\_Lodge-Paoli1](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Michael\_Lodge-Paoli1](https://community.cesium.com/u/Michael_Lodge-Paoli1)\
**Post date:** [June 26, 2015, 1:13pm UTC](https://community.cesium.com/t/possible-bug-when-switching-between-2d-and-3d-when-terrainprovider-has-been-set/2690/3 "2015-06-26T13:13:18Z")

</div>

I opened a new bug [https://github.com/AnalyticalGraphicsInc/cesium/issues/2841](https://github.com/AnalyticalGraphicsInc/cesium/issues/2841)
