Parameter QML Type
名前と値のペアのストレージを提供します。これはシェーダーのユニフォームにマッピングされます。詳細...
Import Statement: | import Qt3D.Render 2.8 |
In C++: | QParameter |
Status: | Deprecated |
プロパティ
詳細説明
Parameter は、RenderPass 、Technique、Effect、Material、TechniqueFilter 、RenderPassFilter によって参照できます。実行時に、レンダリングの特定のステップでどのシェーダが選択され ているかに応じて、Parameter に含まれる値は変換され、Parameter と一致する名前のユニフォームがシェーダに含まれている場合にアップロードされます。
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;
注意: Parameterによってラップされた値が、実際のユニフォームが期待するものに実際に変換できるように、いくつかの注意を払う必要があります。実際のシェーダのユニフォームがfloat型である場合に、int型として格納された値を与えると、未定義の動作になる可能性があります。
注意: 対象となるユニフォームが配列である場合、nameはユニフォームの名前に[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];
テクスチャサポートに関しては、Parameter 値は、シェーダーユニフォームのサンプラータイプに一致する適切なtexture サブクラスに設定する必要があります。
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.