本页内容

AlphaCoverage QML Type

启用“alpha-to-coverage”多采样模式。更多...

Import Statement: import Qt3D.Render 2.12
In C++: QAlphaCoverage
Inherits:

RenderState

Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

详细说明

AlphaCoverage 类型可启用“透明度转覆盖率”多采样模式。启用后,片段透明度值将作为采样的覆盖率,并与片段覆盖率值相结合。 如果禁用了多采样,AlphaCoverage 将不执行任何操作。当需要顺序无关混合时,“透明度转覆盖率”最为有用,例如在渲染树叶、草丛和其他茂密的植被时。

可将其添加到RenderPass 中:

RenderPass {
    shaderProgram: ShaderProgram {
        // ...
    }
    renderStates: [
        AlphaCoverage {},
        MultiSampleAntiAliasing {}
    ]
}

或添加到RenderStateSet 中:

另请参阅 MultiSampleAntiAliasing 。

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