ForwardPass
Introduction
vtkWebGPUForwardPass implements a forward rendering pipeline. Every layer of every drawn renderer is rendered opaque first, into an offscreen color and depth texture, so that the translucent and volume passes can be composited against a valid z-buffer before the result is blitted into the swap chain.
Methods
addVolume
Add a volume view node to the list the volume pass renders.
| Argument | Type | Required | Description |
|---|---|---|---|
volume | vtkWebGPUVolume | Yes | The volume view node to render. |
createFinalBlitEncoder
Create the render encoder, sampler and full screen quad the final blit is drawn with.
| Argument | Type | Required | Description |
|---|---|---|---|
viewNode | vtkWebGPURenderWindow | Yes | The render window view node. |
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUForwardPass 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 | IWebGPUForwardPassInitialValues | No | (default: {}) |
finalPass
Blit the opaque pass color texture into the current swap chain texture.
| Argument | Type | Required | Description |
|---|---|---|---|
viewNode | vtkWebGPURenderWindow | Yes | The render window view node. |
renNode | vtkWebGPURenderer | Yes | The renderer view node, used for its scissor and viewport. |
getOpaquePass
Get the opaque pass, or undefined before the first traversal.
getTranslucentPass
Get the translucent pass, or null while no renderer has held any translucent actor.
getVolumePass
Get the volume pass, or null while no renderer has held any volume.
incrementOpaqueActorCount
Count one opaque actor for the current query pass, and return the count before the increment.
incrementTranslucentActorCount
Count one translucent actor for the current query pass, and return the count before the increment.
newInstance
Method used to create a new instance of vtkWebGPUForwardPass.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUForwardPassInitialValues | No | for pre-setting some of its content |
releaseGraphicsResources
Release the delegate passes and everything the final blit owns.
setOpaquePass
Set the opaque pass.
setTranslucentPass
Set the translucent pass.
setVolumePass
Set the volume pass.
traverse
Render every layer of every drawn renderer of the render window: query the actors, run the opaque pass, then the translucent and volume passes when the renderer holds any, and blit the result into the swap chain.
| Argument | Type | Required | Description |
|---|---|---|---|
viewNode | vtkWebGPURenderWindow | Yes | The render window view node. |
parent | Yes | (default: null) |