Renderer
Introduction
The WebGPU view node of a vtkRenderer: it owns the renderer uniform and light buffers, the stabilized coordinate system, and the viewport of the render passes.
Methods
bindUBO
Bind the renderer bind group, holding the uniform and light buffers.
| Argument | Type | Required | Description |
|---|---|---|---|
renderEncoder | vtkWebGPURenderEncoder | Yes |
buildPass
Builds myself: adopt the active camera and every view prop of the renderable as children, and update the stabilized matrix.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |
clear
Draw the background of the renderer, unless the renderable is transparent or clearing is suppressed.
convertToOpenGLDepth
Convert a WebGPU depth value to the OpenGL depth convention.
| Argument | Type | Required | Description |
|---|---|---|---|
val | Number | Yes |
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPURenderer 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 | IWebGPURendererInitialValues | No | (default: {}) |
getAspectRatio
The aspect ratio of this renderer's viewport, in pixels.
getBindGroup
Get the bind group holding the renderer uniform and light buffers.
getOpaqueColorTextureView
Get the opaque background available for transmission rendering.
getPropFromID
Get the child node whose prop id matches, or null when none does.
| Argument | Type | Required | Description |
|---|---|---|---|
id | Number | Yes |
getRenderEncoder
Get the encoder this renderer draws its passes into.
getSelector
Get the hardware selector currently selecting through this renderer.
getStabilizedCenter
Get a copy of the center of the stabilized coordinate system, in world coordinates.
getStabilizedCenterByReference
Get the center of the stabilized coordinate system without copying it.
getStabilizedTime
The modified time of the stabilized coordinate system, which changes whenever the stabilized center is recentered.
getSuppressClear
Whether clearing the viewport is suppressed, e.g. when another renderer has already drawn into it.
getTiledSizeAndOrigin
The pixel size and lower-left origin of this renderer's viewport.
getUBO
Get the uniform buffer holding the camera matrices of this renderer.
getYInvertedTiledSizeAndOrigin
The pixel size and origin of this renderer's viewport, with the origin measured from the top of the render window.
newInstance
Method used to create a new instance of vtkWebGPURenderer.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPURendererInitialValues | No | for pre-setting some of its content |
opaquePass
Renders myself.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |
opaqueZBufferPass
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |
releaseGraphicsResources
scissorAndViewport
Set the viewport and the scissor rectangle of an encoder to this renderer's viewport.
| Argument | Type | Required | Description |
|---|---|---|---|
encoder | vtkWebGPURenderEncoder | Yes |
setOpaqueColorTextureView
Set or clear the opaque background for transmission rendering.
setRenderEncoder
Set the encoder this renderer draws its passes into.
| Argument | Type | Required | Description |
|---|---|---|---|
renderEncoder | vtkWebGPURenderEncoder | Yes |
setSelector
Set the hardware selector currently selecting through this renderer.
| Argument | Type | Required | Description |
|---|---|---|---|
selector | Yes |
setSuppressClear
Set whether clearing the viewport is suppressed.
| Argument | Type | Required | Description |
|---|---|---|---|
suppressClear | Boolean | Yes |
setUBO
Set the uniform buffer holding the camera matrices of this renderer.
| Argument | Type | Required | Description |
|---|---|---|---|
UBO | vtkWebGPUUniformBuffer | Yes |
translucentPass
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |
updateLights
Create a default light when the renderable has none switched on.
Returns
| Type | Description |
|---|---|
| the number of lights that are on. |
updateSSBO
Push the light positions, directions, colors and attenuations into the renderer storage buffer, when the lights have changed.
updateStabilizedMatrix
Recenter the stabilized coordinate system when the center of the view frustum has moved far enough, relative to the clipping range, that single precision rendering would suffer.
updateUBO
Push the camera matrices, the light count and the viewport size into the renderer uniform buffer, when anything they depend on has changed.
volumeDepthRangePass
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |
zBufferPass
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes |