tfg.rendering.opengl.math.ndc_to_screen

Transforms points from normalized device coordinates to screen coordinates.

Note:

In the following, A1 to An are optional batch dimensions which must be broadcast compatible between point_ndc_space and the other variables.

point_ndc_space A tensor of shape [A1, ..., An, 3], where the last dimension represents points in normalized device coordinates.
lower_left_corner A tensor of shape [A1, ..., An, 2], where the last dimension captures the position (in pixels) of the lower left corner of the screen.
screen_dimensions A tensor of shape [A1, ..., An, 2], where the last dimension is expressed in pixels and captures the width and the height (in pixels) of the screen.
near A tensor of shape [A1, ..., An, 1], where the last dimension captures the distance between the viewer and the near clipping plane. Note that values for near must be non-negative.
far A tensor of shape [A1, ..., An, 1], where the last dimension captures the distance between the viewer and the far clipping plane. Note that values for far must be greater than those of near.
name A name for this op. Defaults to 'ndc_to_screen'.

InvalidArgumentError if any input contains data not in the specified range of valid values.
ValueError If any input is of an unsupported shape.

A tensor of shape [A1, ..., An, 3], containing point_ndc_space in screen coordinates.