# Bug: seam if using depthTestAgainsTerrain:false

**URL:** <https://community.cesium.com/t/bug-seam-if-using-depthtestagainsterrain-false/14713>\
**Category:** CesiumJS\
**Created:** [August 4, 2021, 8:18pm UTC](https://community.cesium.com/t/bug-seam-if-using-depthtestagainsterrain-false/14713 "2021-08-04T20:18:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![v12424124\_34](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/v12424124_34/32/3458_2.png) [@v12424124\_34](https://community.cesium.com/u/v12424124_34)\
**Post date:** [August 4, 2021, 8:18pm UTC](https://community.cesium.com/t/bug-seam-if-using-depthtestagainsterrain-false/14713/1 "2021-08-04T20:18:05Z")

</div>

There is a big seam where-ever tileset should be underground when using depthTestAgainstTerrain:false.

 ![image](https://global.discourse-cdn.com/cesium/original/2X/0/0a7b3837fdca8a093588d4306d7a298c39e76ca4.png)

Any ideas what to try with this? 🙂

_edit:_ It is maybe a duplicate of this:

> <https://github.com/CesiumGS/cesium/issues/7879>
>
> I've run into this with various 3D Tilesets, but this is a good minimal example …produced by Adam Twite in \[this forum thread\](https://groups.google.com/d/msg/cesium-dev/25wlWeLRPII/6x112pjpAwAJ): 
> 
> \[Sandcastle\](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=ZZFRT9swEMe/ipWXplJwWlKGgFANFSQeoEwDbS+RJje+phaOHd25QWXiu+/SBEa3KA93f9/v/L9zq1C0Bl4AxaVw8CIWQGZbyx97LR6V+3ThXVDGAY4S8btwgr8AiCx9Q98aDXj+DpYIKsBPj1Y/9SXxuHBv44vC9fdIKsGBrKxfgdTQhM0TULiquJLCgLCXtbIEDDHGFoGVAQcXTDBAUmkd7800nljxTnyYWCgMHCmXyTX6+hoqBKD4aDo9ldPZSXY6SUR2LL/MsuOzmUjEUTYZJ12r2muw3GcYcouGk5GU6cd/1TSUPqq6sXCtgkr3BKX9xffKDdEvDnnG1SjpO23AVJvwHdaA4Er4a/X28EAuH5Y3A0OlsnAuTiZd+na4xICqfAZ90y1jx8uBiyiJcgo7C/Oe/mrqxmPgGWzMvgOwZX4ZSldbJoMsibp+efoO5dq0wujLIvrn0YtIlFYR8cl6a+2jeYUimucp1x9g1ittXPXQAlq160o20/ldL0op85TT/6ngvV0p/NTxDw). Just try tilting the camera up a bit.
> 
> !\[depth\_plane\_czm\_man\](https://user-images.githubusercontent.com/1711126/58595504-e13d8780-823e-11e9-9c7c-00f2f7f5adf0.gif)
> 
> Here, the 3D model is actually underneath terrain, but depth testing is turned off, so it should show through. It clips because the depth plane (which is used to write depth on the ellipsoid when the globe tiles don't, so that things on the opposite side of the globe don't show through). You can verify this by commenting out the \`depthPlane.execute\` line here in Scene.js:
> 
> https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Scene.js#L2307

---

<div class="post-metadata">

**Author:** ![v12424124\_34](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/v12424124_34/32/3458_2.png) [@v12424124\_34](https://community.cesium.com/u/v12424124_34)\
**Post date:** [August 5, 2021, 4:37am UTC](https://community.cesium.com/t/bug-seam-if-using-depthtestagainsterrain-false/14713/2 "2021-08-05T04:37:42Z")

</div>

For me that mentioned PR [Fix for clipping and camera navigation issues below ellipsoid by chris-cooper · Pull Request #9200 · CesiumGS/cesium · GitHub](https://github.com/CesiumGS/cesium/pull/9200) does not work but setting

My eventual solution:  
scene.logarithmicDepthBuffer = true seems to be best to combat this issue

---

<div class="post-metadata">

**Author:** ![sam.rothstein](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sam.rothstein/32/6584_2.png) [@sam.rothstein](https://community.cesium.com/u/sam.rothstein)\
**Post date:** [August 6, 2021, 12:29am UTC](https://community.cesium.com/t/bug-seam-if-using-depthtestagainsterrain-false/14713/3 "2021-08-06T00:29:07Z")

</div>

@v12424124_34

Thank you for your detailed forum post! I looked over your solution and it seems robust 😃 I will share this thread with other community members if similar issues arise in the future.

-Sam
