HardwareSelectionPass
Introduction
vtkWebGPUHardwareSelectionPass renders the scene into an integer texture whose texels hold [propID, compositeID, attributeID + 1, unused], which vtkWebGPUHardwareSelector reads back to resolve a pick.
Methods
createRenderEncoder
Create the render encoder the selection ids are written through, including the shader replacement packing them into the color attachment.
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUHardwareSelectionPass characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IWebGPUHardwareSelectionPassInitialValues | No | (default: {}) |
getColorTexture
Get the rgba32uint texture holding the selection ids, or null before the first traversal.
getDepthTexture
Get the depth32float texture this pass renders into, or null before the first traversal.
newInstance
Method used to create a new instance of vtkWebGPUHardwareSelectionPass.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUHardwareSelectionPassInitialValues | No | for pre-setting some of its content |
traverse
Render the opaque actors of a renderer into an rgba32uint texture holding the prop, composite and attribute ids of every fragment, allocating or resizing the color and depth textures to the canvas first.
| Argument | Type | Required | Description |
|---|---|---|---|
viewNode | vtkWebGPURenderWindow | Yes | The render window view node. |
renNode | vtkWebGPURenderer | Yes | The renderer view node to traverse. |