OrderIndependentTranslucentPass
Introduction
vtkWebGPUOrderIndependentTranslucentPass renders translucent geometry with weighted blended order-independent transparency. Color and revealage accumulate into two floating point textures, which a full screen quad then resolves onto the opaque pass color texture, so the result does not depend on the order the translucent actors are drawn in.
Methods
createFinalEncoder
Create the render encoder the resolve pass is drawn with.
createRenderEncoder
Create the render encoder the translucent actors accumulate through, including the shader replacement computing the depth weighting.
extend
Method used to decorate a given object (publicAPI+model) with vtkWebGPUOrderIndependentTranslucentPass 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 | IWebGPUOrderIndependentTranslucentPassInitialValues | No | (default: {}) |
finalPass
Draw the full screen quad resolving the two accumulation textures onto the color texture view set on this pass.
| 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. |
getColorTextureView
Get the view of the texture the resolved color is drawn onto.
getDepthTextureView
Get the view of the depth texture the accumulation pass tests against.
getFullScreenQuad
Get the full screen quad that composites the accumulation textures.
getTextures
Get the color and revealage accumulation textures, in that order.
getTranslucentResolveAccumulateTexture
Get the resolved accumulation target used when multisampling is enabled.
getTranslucentResolveColorTexture
Get the resolved color target used when multisampling is enabled.
newInstance
Method used to create a new instance of vtkWebGPUOrderIndependentTranslucentPass.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWebGPUOrderIndependentTranslucentPassInitialValues | No | for pre-setting some of its content |
releaseGraphicsResources
Drop both encoders, both accumulation textures and the full screen quad so that they are recreated on the next traversal.
setColorTextureView
Set the view of the texture the resolved color is drawn onto.
setDepthTextureView
Set the view of the depth texture the accumulation pass tests against.
traverse
Accumulate the translucent actors of a renderer into the color and revealage textures, then resolve them onto the color texture view set on this pass.
| Argument | Type | Required | Description |
|---|---|---|---|
renNode | vtkWebGPURenderer | Yes | The renderer view node to traverse. |
viewNode | vtkWebGPURenderWindow | Yes | The render window view node. |