Parameter QML Type

이름과 값 쌍에 대한 저장소를 제공합니다. 셰이더 유니폼에 매핑됩니다. 더 보기...

Import Statement: import Qt3D.Render 2.8
In C++: QParameter
Status: Deprecated

속성

상세 설명

파라미터는 RenderPass, 테크닉, 효과, 머티리얼, TechniqueFilter, RenderPassFilter 에서 참조할 수 있습니다. 런타임에 렌더링의 특정 단계에서 어떤 셰이더가 선택되었는지에 따라 셰이더에 파라미터와 이름이 일치하는 유니폼이 포함된 경우 파라미터에 포함된 값이 변환되어 업로드됩니다.

Parameter {
    name: "diffuseColor"
    value: "blue"
}

// Works with the following GLSL uniform shader declarations
// uniform vec4 diffuseColor;
// uniform vec3 diffuseColor;
// uniform vec2 diffuseColor;
// uniform float diffuseColor;

참고: 파라미터로 래핑된 값이 실제 유니폼이 기대하는 값으로 실제로 변환될 수 있도록 몇 가지 주의를 기울여야 합니다. 실제 셰이더 유니폼의 유형이 float인 경우 int로 저장된 값을 제공하면 정의되지 않은 동작이 발생할 수 있습니다.

참고: 대상 유니폼이 배열인 경우, 이름은 [0]이 추가된 유니폼의 이름이어야 합니다.

참고: 파라미터 노드는 비활성화할 수 없습니다.

Parameter {
    name: "diffuseValues[0]"
    value: [0.0, 1.0. 2.0, 3.0, 4.0, 883.0, 1340.0, 1584.0]
}

// Matching GLSL shader uniform  declaration
// uniform float diffuseValues[8];

텍스처 지원의 경우, 셰이더 유니폼의 샘플러 유형과 일치하는 적절한 texture 서브클래스로 Parameter 값을 설정해야 합니다.

Parameter {
    name: "diffuseTexture"
    value: Texture2D { ... }
}

// Works with the following GLSL uniform shader declaration
// uniform sampler2D diffuseTexture

Qt3DRender::QAbstractTexture참조하십시오 .

프로퍼티 문서

name : string

파라미터의 이름을 지정합니다.


value : QVariant

파라미터의 값을 지정합니다.


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