Rendering¶
Use render passes to define the rendering of 3D content in your Kanzi application.
For example, in render passes you can define:
Which Camera that render pass and its descendants use for rendering. See Setting the camera for render passes.
What nodes the render pass renders. See Collecting nodes for rendering.
What lights to use to light the content. See Using lights in rendering.
What material to use to render the content. Setting materials for rendering.
The format of the composition target. See Rendering content to composition targets.
Post-processing effects. Creating a post-processing effect.
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.
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.
Composition Target Render Pass¶
Composition Target Render Pass renders itself and its descendant render passes to one or more composition targets.
Cubemap Render Pass¶
Cubemap Render Pass renders itself and its child render passes to an active composition target, such as a Cubemap Render Target Texture and the Result Texture of the Cubemap Render Pass.
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 ancestor Node List Render Pass. See Setting the camera for render passes and Collecting nodes for rendering.
By default renders nodes using the light nodes provided by its nearest ancestor Gather Lights Render Pass. See Using lights in rendering.
Uses the rendering parameters that you set in its nearest ancestor 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.
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.
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.
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.
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, Applying a stencil to 3D content, and Rendering decals.
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.
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.
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.
See also¶
Using Kanzi Studio render pass presets
Collecting nodes for rendering
Rendering multiple render passes or textures
Rendering content to composition targets
Setting materials for rendering
Creating a post-processing effect
Tutorial: Create a bloom effect
Tutorial: Apply a stencil to 3D content