이 페이지에서

SubRenderPass QML Type

부모 RenderPass 와 동일한 렌더 타깃 내에서 작업의 하위 섹션을 렌더링합니다. 더 보기...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

속성

상세 설명

SubRenderPass는 렌더 패스( Command )의 하위 패스로, 렌더 타겟(render target)을 공유하면서 렌더 패스( RenderPass )를 더 작고 독립적으로 구성된 부분들로 세분화합니다. 어떤 텍스처가 렌더링될지( ColorAttachment 및 DepthTextureAttachment 를 통해)와 패스가 시작되는 시점(따라서 렌더 타겟이 지워지는 시점)은 부모 렌더 패스( RenderPass )만이 제어합니다. SubRenderPass는 자체 렌더 타겟이나 지우기 설정을 설정할 수 없으며, 이러한 설정은 항상 부모 패스에서 상속받습니다.

SubRenderPass가 제어할 수 있는 것은 무엇이 어떻게 렌더링되는지입니다. SubRenderPass는 자체적인 렌더 패스 객체( commands)를 가지고 있으므로, 객체의 하위 집합을 선택하기 위한 객체 마스크( RenderablesFilter ), 깊이/블렌드 상태를 변경하기 위한 렌더 패스 객체( PipelineStateOverride ), 별도의 딥스( materialMode) 등을 전달할 수 있습니다.

전형적인 사용 사례는 단일 컬러 패스가 배경, 불투명 오브젝트, 투명 오브젝트에 대해 각각 별도의 SubRenderPass를 사용하는 포워드 렌더링 파이프라인입니다. 이 세 가지 서브 패스는 모두 동일한 컬러 및 뎁스 텍스처에 쓰기를 수행하지만, 각 패스는 서로 다른 파이프라인 상태를 가집니다:

RenderPass {
    id: mainColorPass
    commands: [
        // Render targets are set at the parent RenderPass level only
        ColorAttachment { name: "color0"; target: colorTexture },
        DepthTextureAttachment { target: depthTexture },

        // Sub-pass 1: render the skybox background
        SubRenderPass { renderPass: skyboxSubPass },

        // Sub-pass 2: opaque objects with depth testing and writing
        SubRenderPass { renderPass: opaqueSubPass },

        // Sub-pass 3: transparent objects with blending, no depth write
        SubRenderPass { renderPass: transparentSubPass }
    ]
}

// Sub-passes share mainColorPass's render target
RenderPass {
    id: skyboxSubPass
    passMode: RenderPass.SkyboxPass
}

RenderPass {
    id: opaqueSubPass
    commands: [
        RenderablesFilter { renderableTypes: RenderablesFilter.Opaque }
    ]
}

RenderPass {
    id: transparentSubPass
    commands: [
        RenderablesFilter { renderableTypes: RenderablesFilter.Transparent },
        PipelineStateOverride {
            blendEnabled: true
            depthWriteEnabled: false
        }
    ]
}

RenderPass, RenderablesFilter, PipelineStateOverride도 참조하십시오 .

속성 문서

renderPass : RenderPass

이 명령이 처리될 때 서브패스로 실행될 RenderPass 입니다.

© 2026 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.