Patch Editor
Utility Patches
Perspective Projection Matrix Patch

Perspective Projection Matrix Patch

Use this patch to project a 3D object in the shape of a truncated pyramid. The input parameters define a projection matrix where every point inside the truncated pyramid maps in the range [0.0, 1.0] on every axis.

This type of matrix can be passed into a Shader Code Asset. When it is rendered it is typically used for defining the volume of an object in the shape of a 3D truncated pyramid.

Inputs

NameDescription

Near

The distance of the near plane from the point of projection.

Far

The distance of the far plane from the point of projection.

Horizontal FOV

Horizontal field of view, expressed in degrees.

Vertical FOV

Vertical field of view, expressed in degrees.

Output

NameDescription

Projection Matrix

The perspective projection matrix generated from the provided inputs.

Example

The image below demonstrates the difference between perspective volume projection (left) and orthographic volume projection (right).

Was this article helpful?