Unfortunately that video doesn’t describe what the parameter really means, for example what space the value is in.
The shader code that uses pixel-depth offset is (as of 5.3) in Engine/Shaders/Private/MaterialTemplate.ush (a.k.a the template for each Material’s generated shader code). Line 3711, the function float ApplyPixelDepthOffsetToMaterialParameters(...)
.
float ApplyPixelDepthOffsetToMaterialParameters(inout FMaterialPixelParameters MaterialParameters, FPixelMaterialInputs PixelMaterialInputs, out float OutDepth)
{
float PixelDepthOffset = GetMaterialPixelDepthOffset(PixelMaterialInputs);
// SvPosition.z contains device depth value normally written to depth buffer
// ScreenPosition.z is 'SvPosition.z * SvPosition.w'
// So here we compute a new device depth value with the given pixel depth offset, but clamp the value against the regular SvPosition.z
// This clamp is important, even if PixelDepthOffset is 0.0f, the computed DeviceDepth may end up 'slightly' larger than SvPosition.z due to floating point whatever
// Since we are outputing depth with SV_DepthLessEqual, this ends up as undefined behavior
// In particular, this can cause problems on PS4....PS4 enables RE_Z when using depth output along with virtual texture UAV feedback buffer writes
// RE_Z causes the HW to perform depth test twice, once before executing pixel shader, and once after
// The PreZ pass will write depth buffer using depth offset, then the base pass will test against this value using both modified and unmodifed depth
// If the unmodified depth is ever slightly less than the modified depth, the initial depth test will fail, which results in z-fighting/flickering type artifacts
float DeviceDepth = min(MaterialParameters.ScreenPosition.z / (MaterialParameters.ScreenPosition.w + PixelDepthOffset), MaterialParameters.SvPosition.z);
// Once we've computed our (clamped) device depth, recompute PixelDepthOffset again to take the potential clamp into account
PixelDepthOffset = (MaterialParameters.ScreenPosition.z - DeviceDepth * MaterialParameters.ScreenPosition.w) / DeviceDepth;
// Update positions used for shading
MaterialParameters.ScreenPosition.w += PixelDepthOffset;
MaterialParameters.SvPosition.w = MaterialParameters.ScreenPosition.w;
MaterialParameters.AbsoluteWorldPosition = LWCAdd(MaterialParameters.AbsoluteWorldPosition, -MaterialParameters.CameraVector * PixelDepthOffset);
OutDepth = INVARIANT(DeviceDepth);
return PixelDepthOffset;
}
In short, and as far as I can tell (which isn’t that far), it is a delta for the linear depth buffer (which ranges from 0=near to 1=far) and also propagates to the material’s reported World Position.