Material QML Type

머티리얼에 대해 생성할 수 없는 추상 베이스입니다. 더 보기...

속성

상세 설명

머티리얼은 entity 의 렌더링을 지정하는 방법을 제공합니다. 모든 측면은 머티리얼의 자체 하위 유형을 정의할 수 있으므로, 예를 들어 사운드가 요소에서 반사되는 방식, 표면의 온도 등 시각적 요소를 설명하는 데 머티리얼을 사용할 수 있습니다.

머티리얼은 그 자체로는 아무것도 하지 않습니다. 머티리얼은 이펙트 노드를 참조할 때만 유용해집니다.

실제로는 하나의 이펙트가 여러 머티리얼 컴포넌트에서 참조되는 경우가 많습니다. 이렇게 하면 이펙트, 테크닉, 패스, 셰이더를 한 번만 생성하고 파라미터 인스턴스를 추가하여 머티리얼을 지정할 수 있습니다.

머티리얼에 정의된 파라미터는 이펙트, 테크닉 및 RenderPass 에 정의된 파라미터(같은 이름의 파라미터)를 재정의하지만 RenderPassFilterTechniqueFilter 에 있는 파라미터에 의해 재정의됩니다.

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>

머티리얼에 사용되는 파라미터 목록을 보유합니다.


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