DepthMode
Overview
DepthMode contains parameters that are specific for depth control, like the value used for depth buffer comparisons.
The DepthMode node belongs to the X_ITE component and its default container field is depthMode. It is available in X_ITE.
Info: Please note that this node is still experimental, i.e. the functionality of this node may change in future versions of X_ITE.
Hierarchy
1
2
3
4
+ X3DNode
+ X3DChildNode
+ X3DAppearanceChildNode
+ DepthMode
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
SFVec2f [in, out] polygonOffset 0 0 (-∞,∞)
Specifies the scale factors and units to calculate depth values.
The offset is added before the depth test is performed and before the value is written into the depth buffer.
The first value is factor, a GLfloat which sets the scale factor for the variable depth offset for each polygon. The default value is 0.
The second value is units, a GLfloat which sets the multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
SFVec2f [in, out] depthRange 0 1 [0,1]
Specifies the depth range mapping from normalized device coordinates to window or viewport coordinates.
The first value is zNear, a GLclampf specifying the mapping of the near clipping plane to window or viewport coordinates. Clamped to the range 0 to 1 and must be less than or equal to zFar. The default value is 0.
The second value is zFar, a GLclampf specifying the mapping of the far clipping plane to window or viewport coordinates. Clamped to the range 0 to 1. The default value is 1.
SFBool [in, out] depthTest TRUE
Activates depth comparisons and updates to the depth buffer.
SFString [in, out] depthFunction “LESS_EQUAL” [“NEVER”, “LESS”, “EQUAL”, “LESS_EQUAL”, “GREATER”, “NOT_EQUAL”, “GREATER_EQUAL”, “ALWAYS”]
Specifies a function that compares incoming pixel depth to the current depth buffer value.
Must be one of the following symbolic constants:
- NEVER
- LESS
- EQUAL
- LESS_EQUAL
- GREATER
- NOT_EQUAL
- GREATER_EQUAL
- ALWAYS
SFBool [in, out] depthMask TRUE
Sets whether writing into the depth buffer is enabled or disabled.