The 3D Handbook
Key term

Pixel depth offset

A material output that pushes each pixel's depth back from the camera, so other surfaces win the depth test there; used to soften intersections with a dither and to let parallax-mapped surfaces intersect correctly, at a cost.

materialsshadersunrealblendingrendering

Pixel depth offset (PDO) is a material output that changes how far from the camera each pixel is recorded in the depth buffer, without moving any geometry. Epic's documentation says it "can be used to control pixel depth in the shader graph using logic you set up", which "enables you to create your own logic to blend or fade objects based on their scene depth" (Unreal Engine 4.27 documentation: Material Inputs).

Where two surfaces overlap on screen, the GPU keeps the one closest to the camera. If a material pushes some of its pixels back, the surface behind can win in those places. That is all PDO does, and it is enough for two common jobs: softening intersections and making fake depth from parallax occlusion mapping intersect properly.

#Softening intersections with a dither

When a rock is pushed into the ground, the two surfaces cross in a sharp, straight line (see blending meshes into terrain). With PDO, the rock's material can push its pixels back by varying amounts near the ground, so in a band around the intersection some pixels show rock and some show ground.

Epic's example combines PDO with the DitherTemporalAA material function, which sets an "offset" value "that blends the ground with the object intersecting it using a stipple pattern texture" (Unreal Engine 4.27 documentation: Material Inputs). The stipple alone looks noisy; the engine's temporal anti-aliasing blurs it across frames into a soft transition.

On the Polycount thread about Star Wars Battlefront's terrain blending, leleuxart suggests that PDO with DitherTemporalAA in Unreal can approximate the soft blend seen in that game, with the rest coming from world-space textures and detail maps (Polycount: Battlefront's Level Construction - how can…).

Two front views of a grey rock meeting a beige ground. Left, the boundary is a hard straight line. Right, a dashed orange band marks a dithered zone just above the boundary where scattered ground-coloured pixels show through the rock, more of them closer to the ground.
Without PDO the rock and ground meet in a hard line. With a dithered offset, rock pixels near the ground are pushed back so the ground wins some depth tests; temporal anti-aliasing smooths the pattern.Diagram by the handbook author

#Use with parallax occlusion mapping

Parallax occlusion mapping makes a flat surface look deep by shifting texture coordinates per pixel. The depth buffer still holds the flat surface, so objects placed on a POM floor, and decals projected onto it, intersect the flat plane rather than the visible bumps. Writing the marched depth through PDO lets other objects sink into the fake relief at the right height; see the POM page for how Unreal's POM function exposes this output.

The artist's caption: "Water surface blends with terrain POM thanks to pixel depth offsetting intersecting POM surface accurately, coupled with depth fading on water surface." Look at the shoreline: the water cuts the visible bumps of the parallax ground, not the flat polygon underneath.Karl Schecht, via ArtStation

#How to set it up

These steps soften a rock's intersection with the ground in Unreal Engine.

  1. Open the rock's material and check that its Pixel Depth Offset input is available (it is a standard material input (Unreal Engine 4.27 documentation: Material Inputs)).
  2. Build a height mask. Create a gradient that is 1 at the bottom of the rock and 0 about 30–50 cm up, for example from world position Z relative to the ground.
  3. Add DitherTemporalAA. Feed the mask into the DitherTemporalAA function so the transition becomes a stipple pattern (Unreal Engine 4.27 documentation: Material Inputs).
  4. Scale the offset. Multiply the result by an offset distance (start around 20–50 units for a large rock) and connect it to Pixel Depth Offset.
  5. Test with temporal anti-aliasing on. The stipple only reads as a soft blend when the anti-aliasing method blends over time.
  6. Check shadows and other passes. Look at the shadow where the rock meets the ground; in Unity, one user found his depth-offset workaround did not stop an impostor quad affecting shadows (Unity Discussions: Depth output for shader graph -> PDO (Pixel…).
  7. Profile it. Compare GPU time and, on Nanite meshes, check the cost described below.

#Video tutorials

#Costs and limits

The artist notes that Temporal Super Resolution "not only cleaned up noisy dithering/edges" but also improved performance in this scene. Dithered blends depend on a temporal method like this; in a still frame without it, the stipple would show.Karl Schecht, via ArtStation

#Use in shipped games

PDO is an engine feature, so studios rarely mention it in breakdowns. Fortnite Battle Royale Chapter 4 (Epic Games) is a documented case: its move to Nanite had to handle materials with Pixel Depth Offset, which led to the programmable rasterizer (Unreal Engine tech blog: Bringing Nanite to Fortnite Battle Royale in…). For Star Wars Battlefront (DICE, Frostbite), PDO is only a practitioner's suggestion for reproducing the look in Unreal, not a documented technique of the game (Polycount: Battlefront's Level Construction - how can…).

#In different tools

#Further reading and watching

Related pages: blending meshes into terrain, skirts, parallax occlusion mapping, Z-fighting, opacity, masked and translucent materials, virtualised geometry.

References

  1. Epic Games · Material Inputs (Pixel Depth Offset) · Unreal Engine 4.27 documentation · docs · accessed 2026-10-22
  2. Polycount forum (leleuxart and others) · Battlefront's Level Construction - how can everything just sort of match and blend? · Polycount · forum · accessed 2026-10-22
  3. Unity Discussions (Nexusmaster, BenCloward, MajorWolph and others) · Depth output for shader graph -> PDO (Pixel Depth Offset) -> terrain blending -> billboard shadows · Unity Discussions, 2023 · forum · accessed 2026-10-22
  4. tharlevfx · Object Blending with Dither Fade, Pixel Depth Offset and Distance Fields · YouTube · video · accessed 2026-10-22
  5. Graham Wihlidal (Epic Games) · Bringing Nanite to Fortnite Battle Royale in Chapter 4 · Unreal Engine tech blog, 2023 · article · accessed 2026-10-22

Also consulted

Last updated 2026-10-22