CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.68k stars 3.44k forks source link

Clipping with log depth and adjusted depth plane #10166

Open ggetz opened 2 years ago

ggetz commented 2 years ago

https://github.com/CesiumGS/cesium/pull/9200 introduced the ability to adjust the depth plane to prevent clipping when data is below the ellipsoid, however, this is not handled in the log depth buffer.

The error can be reproduce din this sandcastle if you tip the camera up slightly.

v8gx commented 2 years ago

Thanks! I will add the image here as well, the area marked red should not be clipped of the character model.

I would also point out that this issue occurs without log depth. So the title could be corrected: Clipping without the log depth and adjusted depth plane

(https://github.com/CesiumGS/cesium/pull/9200 did fix this issue when log depth is on.)

Image