Steps to Reproduce

**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]

 

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-112169 in the post.

2
Login to Vote

Non-Issue
ComponentUE - Graphics Features
Affects Versions4.26
Target Fix5.1
CreatedMar 26, 2021
ResolvedMay 3, 2022
UpdatedMay 16, 2022