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.