UnprojectScreenPoint
function · camera · primitive
- Address
0x7ad2c0· 1328 bytes, up to0x7ad7ef- Signature
void __fastcall (float *near_point, float *far_point, float a, float b)- Meaning
- Maps a screen fraction (a, b) to near and far plane points through the device matrices
- Confidence
- verified, proof one
- Finding
- camera#unprojection
- Test
camera::camera_frustum_split
Finding: Unprojection in camera
0x7ad2c0 maps a screen fraction (a, b), each in [0, 1] from the bottom-left, to a point on
the near plane and a point on the far plane, written through ecx and edx. It reads two device
matrices, builds the eight frustum corners c0 to c7 with 0x5c43b0, and interpolates: near is
lerp(lerp(c0, c1, b), lerp(c3, c2, b), a), far the same over c4, c5, c7, c6. It does
not read a camera.
The derivation is in the doc.
Callers 1
Callees 10
- __ehvec_dtor crt
- SplatVector3 loadingscreen
- SetVector3 spline
- SubtractVector3 ui
- GetDeviceProjection gx
- GetDeviceView gx
- BuildFrustumCorners gxumath
- ScaleVector3 objectlayer
- AddVector3 objectlayer
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.