Skip to content

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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUHardwareSelectionPassInitialValuesNo(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.

ArgumentTypeRequiredDescription
initialValuesIWebGPUHardwareSelectionPassInitialValuesNofor 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.

ArgumentTypeRequiredDescription
viewNodevtkWebGPURenderWindowYesThe render window view node.
renNodevtkWebGPURendererYesThe renderer view node to traverse.