Qt Quick 3D - 无阶透明度示例

演示Qt Quick 3D 中的阶次无关透明。

OIT示例演示了如何在Qt Quick 3D 中启用阶次无关透明。该示例包含多个以不同方式使用该功能的示例。

示例包括

粒子示例演示了如何使用 OIT 制作透明粒子。实例化示例展示了如何在使用实例化渲染的模型中使用 OIT。混合值正确性示例演示了透明对象的排序问题,并让用户启用 OIT 来解决该问题。

控制 OIT

OIT 由SceneEnvironment 对象控制。值根据用户界面中的选择进行设置。

oit method 默认设置为OITNone 以禁用该功能,也可将其设置为OITWeightedBlended 以启用 OIT。

        environment: SceneEnvironment {
            clearColor: "#000000"
            backgroundMode: SceneEnvironment.Color
            antialiasingMode: AppSettings.antialiasingMode
            antialiasingQuality: AppSettings.antialiasingQuality
            oitMethod: SceneEnvironment.OITWeightedBlended
        }

示例项目 @ code.qt.io

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