Constructor
new ViewportDepthNode( scope : 'depth' | 'depthBase' | 'linearDepth', valueNode : Node )
Constructs a new viewport depth node.
| scope |
The node's scope. |
| valueNode |
The value node. Default is |
Properties
.isViewportDepthNode : boolean (readonly)
This flag can be used for type testing.
Default is true.
.scope : 'depth' | 'depthBase' | 'linearDepth'
The node behaves differently depending on which scope is selected.
ViewportDepthNode.DEPTH_BASE: Allows to define a value for the current fragment's depth.ViewportDepthNode.DEPTH: Represents the depth value for the current fragment (valueNodeis ignored).ViewportDepthNode.LINEAR_DEPTH: Represents the linear (orthographic) depth value of the current fragment. If avalueNodeis set, the scope can be used to convert perspective depth data to linear data.
.valueNode : Node
Can be used to define a custom depth value.
The property is ignored in the ViewportDepthNode.DEPTH scope.
Default is null.