Capítulo 393 de 859

Chapter 393: ClippingNode

Core Idea

This node is used in NodeMaterial to setup the clipping which can happen hardware-accelerated (if supported) and optionally use alpha-to-coverage for anti-aliasing clipped edges.

Key Concepts

  • scope : 'default' | 'hardware' | 'alphaToCoverage': The node's scope. Similar to other nodes, the selected scope influences the behavior of the node and what type of code is generated.

Reference Tables

Constructor

Signature
`new ClippingNode( scope : 'default'

Properties

PropertyDescription
`.scope : 'default''hardware'

Methods

MethodDescription
.setup( builder : NodeBuilder ) : NodeSetups the node depending on the selected scope.
.setupAlphaToCoverage( intersectionPlanes : Array.<Vector4>, unionPlanes : Array.<Vector4> ) : NodeSetups alpha to coverage.
.setupDefault( intersectionPlanes : Array.<Vector4>, unionPlanes : Array.<Vector4> ) : NodeSetups the default clipping.
.setupHardwareClipping( unionPlanes : Array.<Vector4>, builder : NodeBuilder ) : NodeSetups hardware clipping.

Key Takeaways

  1. ClippingNode extends: EventDispatcher → Node
  2. Most relevant properties: scope.
  3. Key methods: setup, setupAlphaToCoverage, setupDefault, setupHardwareClipping.

Connects To