**According the following equations, the SceneDepth in perspective projection should be SceneDepth = 1.0f / (DeviceZ * View.InvDeviceZToWorldZTransform[2] - View.InvDeviceZToWorldZTransform[3]),
so the inverse operation should be
DeviceZ = ((1.0f / SceneDepth) + View.InvDeviceZToWorldZTransform[3]) / View.InvDeviceZToWorldZTransform[2],
but now it is
DeviceZ = 1.0f / ((SceneDepth + View.InvDeviceZToWorldZTransform[3]) * View.InvDeviceZToWorldZTransform[2]).
// View.InvDeviceZToWorldZTransform[0] = 0.0f
// View.InvDeviceZToWorldZTransform[1] = 0.0f
// View.InvDeviceZToWorldZTransform[2] = 1.0f / ProjMatrix.M[3][2]
// View.InvDeviceZToWorldZTransform[3] = ProjMatrix.M[2][2] / ProjMatrix.M[3][2]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-112169 in the post.
2 |
Component | UE - Graphics Features |
---|---|
Affects Versions | 4.26 |
Target Fix | 5.1 |
Created | Mar 26, 2021 |
---|---|
Resolved | May 3, 2022 |
Updated | May 16, 2022 |