On this page

RenderPass QML Type

The RenderPass type defines a custom render pass for rendering 3D content. More...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Object3D

Properties

Detailed Description

A RenderPass allows you to define a custom rendering step in the rendering pipeline. You can specify various properties such as clear color, material mode, and override materials. Additionally, you can define a list of render commands that dictate how the rendering should be performed.

Exposing data to the shaders

As with Effects and Custom Materials, the RenderPass will expose, and update, user defined properties to the shader automatically.

Property Documentation

augmentShader : url

This property holds the augment shader URL for the render pass when materialMode is set to AugmentMaterial.

The shader file should contain a function with the following signature:

void MAIN_FRAGMENT_AUGMENT() {
    // Custom shader code here
}

This function will be combined with the existing fragment shader of the material being used by the object being rendered in this render pass. Allowing users to augment the existing material shader with custom code.

clearColor : color [default: Qt.black]

This property holds the clear color for the render pass.

commands : list<RenderCommand>

This property holds the list of render commands for the render pass.

The commands in the list are executed in the order they appear in the list.

Note: The commands for RenderPass and Effects are similar but not the same, only those marked as compatible can be used with this RenderPass.

See also renderTargetBlend, PipelineStateOverride, RenderablesFilter, RenderPassTexture, ColorAttachment, DepthTextureAttachment, DepthStencilAttachment, and AddDefine.

depthClearValue : real [default: 1.0]

This property holds the depth clear value for the render pass.

enableClearBuffers : bool [default: true.]

This property holds whether the render pass should clear its buffers before rendering.

materialMode : RenderPass::MaterialModes [default: RenderPass.OriginalMaterial]

This property holds the material mode for the render pass.

ConstantDescription
RenderPass.OriginalMaterialUse the original material of the object.
RenderPass.AugmentMaterialAugment the original material with custom shader code.
RenderPass.OverrideMaterialOverride the original material with a user specified material.

overrideMaterial : Material

This property holds the override material for the render pass when materialMode is set to OverrideMaterial.

passMode : RenderPass::PassMode [default: RenderPass.UserPass]

This property holds the pass mode for the render pass.

In addition to standard user render passes, Qt Quick 3D supports users to manually triggering internal render passes for rendering the skybox and 2D items.

ConstantDescription
RenderPass.UserPassA user specified render pass.
RenderPass.SkyboxPassQt Quick 3D's built-in skybox render pass.
RenderPass.Item2DPassQt Quick 3D's built-in 2D item render pass.

stencilClearValue : int [default: 0]

This property holds the stencil clear value for the render pass.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.