Skip to content

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.

ArgumentTypeRequiredDescription
volumevtkWebGPUVolumeYesThe volume view node to render.

createFinalBlitEncoder ​

Create the render encoder, sampler and full screen quad the final blit is drawn with.

ArgumentTypeRequiredDescription
viewNodevtkWebGPURenderWindowYesThe render window view node.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkWebGPUForwardPass characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIWebGPUForwardPassInitialValuesNo(default: {})

finalPass ​

Blit the opaque pass color texture into the current swap chain texture.

ArgumentTypeRequiredDescription
viewNodevtkWebGPURenderWindowYesThe render window view node.
renNodevtkWebGPURendererYesThe 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.

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

ArgumentTypeRequiredDescription
viewNodevtkWebGPURenderWindowYesThe render window view node.
parentYes(default: null)