|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
|
inline |
Recover the world-space position at a known depth for a given pixel.
Unprojects a window pixel and a Vulkan NDC depth value [0, 1] back into world space by inverting the full view-projection transform. This is the inverse of what the vertex shader does: given the depth the GPU wrote into the depth attachment at (window_x, window_y), return the world position that produced it.
The depth value must be in Vulkan's [0, 1] range (not OpenGL's [-1, 1]). Pass 0.0 to recover the near-plane position, 1.0 for the far plane. A value sampled from the depth attachment is valid directly.
| window_x | X in window space [0, width] (top-left origin). |
| window_y | Y in window space [0, height] (top-left origin). |
| width | Window width in pixels. |
| height | Window height in pixels. |
| ndc_depth | Depth in [0, 1] (Vulkan convention). |
| vt | Active ViewTransform (view + projection matrices). |
Definition at line 198 of file HitTest.hpp.
References h, MayaFlux::Kinesis::ViewTransform::projection, MayaFlux::Kinesis::ViewTransform::view, and width.