이 페이지에서

Parameter QML Type

이름-값 쌍을 저장하는 기능을 제공합니다. 이는 셰이더 유니폼에 매핑됩니다. 더 보기...

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

이 유형은 더 이상 사용되지 않습니다. 새로운 코드에서는 이 유형을 사용하지 않는 것을 강력히 권장합니다.

속성

상세 설명

매개변수(Parameter)는 셰이더 함수( RenderPass), 테크닉(Technique), 이펙트(Effect), 머티리얼(Material), 셰이더 함수( TechniqueFilter), 셰이더 함수( RenderPassFilter)에서 참조될 수 있습니다. 실행 시, 렌더링의 특정 단계에 대해 선택된 셰이더에 따라, 해당 매개변수의 이름과 일치하는 유니폼(uniform)이 셰이더에 포함되어 있다면 매개변수에 포함된 값이 변환되어 업로드됩니다.

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 노드는 비활성화할 수 없습니다.

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 {
    name: "diffuseTexture"
    value: Texture2D { ... }
}

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

Qt3DRender::QAbstractTexture도 참조하십시오 .

속성 설명서

name : string

매개변수의 이름을 지정합니다.

value : QVariant

매개변수의 값을 지정합니다.

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