Rendering

Use render passes to define the rendering of 3D content in your Kanzi application.

For example, in a render pass you can define which Camera that render pass uses for rendering, what nodes it renders, what material it uses to render the content, and settings for the color and depth buffer use.

In a render pass prefab you can create a hierarchy of render passes to achieve a specific rendering result.

In the Library > Rendering > Render Pass Prefabs each top-level render pass is the root of a render pass prefab.

Kanzi executes the render passes in each render pass prefab from top to bottom the way they appear in the render pass prefab in the Library. Each render pass applies its settings and renders its children. See Using render passes.

For example, the Default Render Pass, which is one of the render pass presets that come with Kanzi Studio, creates a basic set of render passes that first render opaque nodes and then transparent nodes. See Using the Default Render Pass.

Render passes

These render passes are available in Kanzi:

Blit Render Pass

Blit Render Pass blits one or more textures on the screen using a specific material.

See Rendering content to composition targets, Rendering multiple render passes or textures, and Creating a post-processing effect.

../../_images/blit-render-pass.svg

Clear Render Pass

Clear Render Pass clears some or all of the buffers of the current render context.

You can set the values to which Kanzi clears the color, depth, and stencil buffer.

../../_images/clear-render-pass.svg

Composition Target Render Pass

Composition Target Render Pass renders itself and its descendant render passes to one or more composition targets.

See Rendering content to composition targets.

../../_images/composition-target-render-pass.svg

Cubemap Render Pass

Cubemap Render Pass renders itself and its child render passes to a cubemap composition target.

See Creating cubemap reflections.

../../_images/cubemap-render-pass.svg

Draw Objects Render Pass

Draw Objects Render Pass allows you to set a Camera node to render a specific list of nodes using specific light nodes.

The Draw Objects Render Pass:

  • By default uses the default Camera node to render all nodes in a Scene node, or the nodes passed to it by its nearest ascendant Node List Render Pass. See Collecting nodes for rendering.

  • Renders nodes by default using the light nodes provided by its nearest ascendant Gather Lights Render Pass. See Using lights in rendering.

  • Uses the rendering parameters that you set in its nearest ascendant Pipeline State Render Pass.

  • Allows you to control frustum culling. See Controlling frustum culling.

Draw Objects With Material Render Pass

Draw Objects With Material Render Pass works like a Draw Objects Render Pass but allows you to set a material that it uses to render content. See Setting materials for rendering.

Gather Lights Render Pass

Gather Lights Render Pass allows you to collect from a list of nodes the light nodes for lighting 3D nodes in a scene.

See Using lights in rendering.

../../_images/gather-lights-render-pass1.svg

Group Render Pass

Group Render Pass allows you to collect render passes so that you can refer to a single render pass prefab in your Viewport 2D node.

If your topmost render pass can have all your other render passes as its children, you do not need a Group Render Pass.

../../_images/group-render-pass.svg

Material Setup Render Pass

Material Setup Render Pass allows you to set properties for a material so that all successive rendering with that material uses the property values that you set in this render pass.

See Setting materials for rendering.

../../_images/material-setup-render-pass.svg

Node List Render Pass

Node List Render Pass allows you to filter and hold a list of nodes that you want to render using other render passes.

See Collecting nodes for rendering.

../../_images/node-list-render-pass1.svg

Pipeline State Render Pass

Pipeline State Render Pass allows you to set for its child render passes depth and stencil testing, transparency, and culling. This render pass sets the rendering state before passing the control to its descendants. After the descendant render passes of a Pipeline State Render Pass execute, Kanzi restores the rendering state. See Setting the cull mode and Applying a stencil to 3D content.

../../_images/pipeline-state-render-pass.svg

Compose and Blit Pass

Compose and Blit Pass contains the render pass structure that enables you to blit to the screen Composition Target Render Pass render passes or textures using a specific material.

See Rendering content to composition targets.

../../_images/compose-and-blit-pass.svg

Default Render Pass

Default Render Pass contains a basic set of render passes that first render opaque nodes and then transparent nodes.

Use the Default Render Pass as a starting point for your render pass tree. See Using the Default Render Pass.

../../_images/default-render-pass.svg

Render to Texture Pass

Render to Texture Pass creates the render passes and texture you need to render to a texture.

See Rendering to texture.

../../_images/render-to-texture-pass.svg