How to implement terrain border fall-off effect using Shader Graph with box volume in Cesium for Unity (URP)

Hi everyone,

I’m working on a Unity XR project using Cesium for Unity and am trying to replicate a terrain visualization effect similar to what’s shown in this video (timestamp 0:34):
Airbus XR demo

:compass: What I’m trying to achieve:
A visual “border fall-off” effect around a defined region of Cesium terrain. Specifically:

  • The terrain inside a defined box volume remains fully visible and intact.
  • Terrain outside the box gradually drops downward (like it’s sinking), giving the appearance that the selected area is being elevated or cropped from the Earth.
  • This is not a glow or a simple alpha fade — it’s an actual mesh displacement (or visual illusion thereof) that creates the impression of terrain deformation outside the clipping region.

I am using:

  • Cesium for Unity SDK : 1.17.0
  • Unity: 6.1.xx
  • Render Pipeline: Universal Render Pipeline (URP)
  • Target: XR / MR use case (Meta quest 3 headset)

:hammer_and_wrench: What I’ve tried so far:

  • Built a Shader Graph that:
    • Takes in a world-to-local matrix (_WorldToClipVolume) and box size (_ClipBoxSize)
    • Computes each vertex’s distance to the box edge using abs(localPos) - boxHalfSize
    • Applies smoothstep-based vertical displacement outside the box
  • Wrote a script that sends the box transform to the shader each frame
  • Assigned the Shader Graph-based material to Cesium3DTileset’s opaqueMaterial field
    Wrote a script that sends the box transform to the shader each frame


    However, i was able to cut the cesium to the box volume as shown below but the displacement does not seem to apply to the terrain.

:light_bulb: Specific questions:

  • Has anyone successfully implemented a border fall-off or similar terrain deformation effect using Shader Graph and Cesium for Unity?
  • Are Cesium terrain tiles deform-able via vertex displacement in URP?

Any help, insights, or examples from the community would be greatly appreciated.

Hi @Manvendra_Deora, welcome to the community!

Sorry for the delay on this one. Your approach makes sense to me, and I don’t know of any reason it wouldn’t work. I’ve asked someone else on the team to take a closer look, so hopefully we can give you a better answer soon.

I am still awaiting the updated responses from your team member. Could you please share any updates on this thread? I have also tried alternative approaches but have not been able to achieve any similar results so far.

Hi Manvendra,

Here’s a basic implementation that I believe covers what you’re asking for. For simplicity, I’ve gone with a center + radius deformation volume as opposed to a bounding volume.

The FalloffDisplacement custom function is simple enough, and could be implemented using Shader Graph nodes:

float dist = distance(vCenter.xz,vAbsWorld.xz);
if (dist > fRadius) {
    vAbsWorld.y -= fFalloffHeight;
}
vOut = vAbsWorld;

Modifying that to use a sinusoidal falloff is trivial.

Incorporate the clipping logic from your previous version and you should be good to go.

I managed to create a similar effect using shader graph. Unfortunately due to the way Cesium handles the terrain rendering using tiles with different LODs based on camera distance and loading state the effect looks very janky when panning the terrain.

At least for my use case I cannot decrease screen space error too much which leads to even more unwanted rendering artifacts.

One would have to make sure the mesh has a consistent and high enough tesselation to achieve a look as smooth as in the reference image.