このページでは

Material QML Type

マテリアルのための作成不可能な抽象ベース。詳細...

プロパティ

詳細説明

Material は、entity のレンダリングを指定する方法を提供します。 どのようなアスペクトでも Material のサブタイプを定義できるので、Material を使って視覚的な要素を記述できます。例えば、音が要素に反射する方法や、表面の温度などです。

マテリアル自体は何もしません。マテリアルが役に立つのは、エフェクトノードを参照している時だけです。

実際には、1つのEffectが複数のMaterialコンポーネントから参照されることがよくあります。これにより、エフェクト、テクニック、パス、シェーダを一度だけ作成し、パラメータインスタンスを追加してマテリアルを指定することができます。

マテリアルに定義されたパラメータは、エフェクト、テクニック、RenderPass に定義されたパラメータ(同名)をオーバーライドしますが、RenderPassFilter とTechniqueFilter のパラメータによってオーバーライドされます。

Effect {
    id: effect

    techniques: [
        Technique {
            id: gl3Technique
            graphicsApiFilter {
                api: GraphicsApiFilter.OpenGL
                profile: GraphicsApiFilter.CoreProfile
                majorVersion: 3
                minorVersion: 1
            }
            renderPasses: [
                RenderPass {
                    id: gl3Pass
                    shaderProgram: ShaderProgram {
                        ...
                    }
                }
            ]
        }
    ]
}

Material {
    id: material1
    parameters: [
        Parameter { name: "color"; value: "green" }
    ]
}

Material {
    id: material2
    parameters: [
        Parameter { name: "color"; value: "white" }
    ]
}

Effect 、Technique 、Parameterも参照してください 。

プロパティ ドキュメント

effect : Effect

マテリアルで使用するエフェクトを指定します。


parameters : list<Parameter>

マテリアルで使用されるパラメータのリストを保持します。


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