Share via


DepthConvention Enum

Definition

The screen space floating point z convention used for rendering

public enum class DepthConvention
public enum DepthConvention
type DepthConvention = 
Public Enum DepthConvention
Inheritance
DepthConvention

Fields

Name Value Description
ZeroToOne 0

Z is in range [0;1], with 0 being the camera-closest and 1 being the camera-farthest z value possible.

MinusOneToOne 1

Z is in range [-1;1], with -1 being the camera-closest and 1 being the camera-farthest z value possible.

OneToZero 2

Z is in range [1;0], with 1 being the camera-closest and 0 being the camera-farthest z value possible

OneToMinusOne 3

Z is in range [1;-1], with 1 being the camera-closest and -1 being the camera-farthest z value possible

Remarks

You should use the z-convention you are expecting locally for your projection matrix. If your screen space z range is [0;1], set ZeroToOne and MinusOneToOne for [-1;1]. If you need an inverse Z matrix, use the respective conventions OneToZero for [1;0] and OneToMinusOne for [1;-1].

Applies to

See also