# Pixel Depth offset and Z-Prepass

**URL:** <https://forums.unrealengine.com/t/pixel-depth-offset-and-z-prepass/793001>\
**Category:** Rendering\
**Tags:** depth, unreal-engine, Rendering, question\
**Created:** [March 17, 2023, 2:39pm UTC](https://forums.unrealengine.com/t/pixel-depth-offset-and-z-prepass/793001 "2023-03-17T14:39:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnsu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@johnsu](https://forums.unrealengine.com/u/johnsu)\
**Post date:** [March 17, 2023, 2:39pm UTC](https://forums.unrealengine.com/t/pixel-depth-offset-and-z-prepass/793001/1 "2023-03-17T14:39:48Z")

</div>

Allegedly the z-prepass is rendered without taking material into consideration. So how does pixel depth offset be able to affect depth result?

I was able to find the function that apply PDO to depth buffer (in DepthOnlyPixelShader.usf):

```plaintext
			ApplyPixelDepthOffsetToMaterialParameters(MaterialParameters, PixelMaterialInputs, OutDepth);

```

Does that imply that material expressions related to depth actually being processed?
