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 AnswerHub just mention UE-112169 in the post.

1
Login to Vote

Unresolved
ComponentRendering
Affects Versions4.26
CreatedMar 26, 2021
UpdatedApr 8, 2021