tfg.rendering.opengl.math.eye_to_clip

Transforms points from eye to clip space.

Note:

In the following, A1 to An are optional batch dimensions which must be broadcast compatible.

point_eye_space A tensor of shape [A1, ..., An, 3], where the last dimension represents the 3D points in eye coordinates.
vertical_field_of_view A tensor of shape [A1, ..., An, 1], where the last dimension represents the vertical field of view of the frustum. Note that values for vertical_field_of_view must be in the range ]0,pi[.
aspect_ratio A tensor of shape [A1, ..., An, 1], where the last dimension stores the width over height ratio of the frustum. Note that values for aspect_ratio must be non-negative.
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 non-negative.
name A name for this op. Defaults to 'eye_to_clip'.

ValueError If any input is of an unsupported shape.

A tensor of shape [A1, ..., An, 4], containing point_eye_space in homogeneous clip coordinates.