Calculate clipspace.w from clipspace.xyz and (inv) projection matrix
问题 I'm using a logarithmic depth algorithmic which results in someFunc(clipspace.z) being written to the depth buffer and no implicit perspective divide . I'm doing RTT / postprocessing so later on in a fragment shader I want to recompute eyespace.xyz, given ndc.xy (from the fragment coordinates) and clipspace.z (from someFuncInv() on the value stored in the depth buffer). Note that I do not have clipspace.w, and my stored value is not clipspace.z / clipspace.w (as it would be when using fixed