I’m working on a Cesium project where I need to apply selective terrain exaggeration to visualize global elevation features using Cesium World Bathymetry, with distinct exaggeration rates for land (above 0m) and ocean (below 0m) to highlight their features at maximum zoom levels. I’ve attempted a custom terrain provider to modify quantized-mesh heights dynamically, but despite successful height modifications (confirmed via logs), the visual updates aren’t reflecting in the scene, likely due to Cesium’s tile caching. I’ve also tried a PostProcessStage approach, but struggled with accurate height sampling from the depth buffer. I’m looking for insights or simpler methods to achieve this dual-rate exaggeration, as the lack of online discussion suggests there might be an obvious solution I’m missing. Any advice on forcing terrain updates, better height sampling, or alternative approaches would be greatly appreciated!
Hi @Worldbuilder, welcome to the community!
I don’t think the current CesiumJS API supports this kind of selective exaggeration.
The quickest way to implement it might be to modify this line in GlobeVS.glsl and rebuild. For an interactive adjustment of the exaggeration rates, you would need to add properties to the FrameState
(in addition to exaggeration
) and copy them through to the shader uniforms in GlobeSurfaceTileProvider
.