picogl.backend.modern.core.unproject
Modern OpenGL Unproject Function
Functions
|
unproject |
Module Contents
- picogl.backend.modern.core.unproject.unproject(x: int, y: int, depth: float, model_view: numpy.ndarray, projection: numpy.ndarray, viewport: Tuple[int, int, int, int]) tuple[Any, Ellipsis] | None[source]
unproject
- Parameters:
x – X screen coordinate
y – Y screen coordinate
depth – Depth value from depth buffer (range 0.0 - 1.0)
model_view – 4x4 model_matrix-view matrix
projection – 4x4 projection matrix
viewport – Viewport tuple (x, y, width, height)
- Returns:
(x, y, z) in world space, or None if invalid
Unprojects 2D screen coordinates into 3D world coordinates in modern OpenGL.