The QMetalRoughMaterial provides a default implementation of PBR lighting. 更多...
头: | #include <QMetalRoughMaterial> |
qmake: | QT += 3dextras |
Since: | Qt 5.9 |
实例化: | MetalRoughMaterial |
继承: | Qt3DRender::QMaterial |
继承者: | Qt3DExtras::QTexturedMetalRoughMaterial |
|
|
QMetalRoughMaterial (Qt3DCore::QNode * parent = nullptr) | |
virtual | ~QMetalRoughMaterial () |
QVariant | ambientOcclusion () const |
QVariant | baseColor () const |
QVariant | metalness () const |
QVariant | normal () const |
QVariant | roughness () const |
float | textureScale () const |
void | setAmbientOcclusion (const QVariant & ambientOcclusion ) |
void | setBaseColor (const QVariant & baseColor ) |
void | setMetalness (const QVariant & metalness ) |
void | setNormal (const QVariant & normal ) |
void | setRoughness (const QVariant & roughness ) |
void | setTextureScale (float textureScale ) |
void | ambientOcclusionChanged (const QVariant & ambientOcclusion ) |
void | baseColorChanged (const QVariant & baseColor ) |
void | metalnessChanged (const QVariant & metalness ) |
void | normalChanged (const QVariant & normal ) |
void | roughnessChanged (const QVariant & roughness ) |
void | textureScaleChanged (float textureScale ) |
const QMetaObject | staticMetaObject |
The QMetalRoughMaterial provides a default implementation of PBR lighting.
This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 3 and OpenGL ES 3.
Holds the current ambient occlusion map texture of the material. This can only be a texture, otherwise it is ignored. By default this map is not set.
访问函数:
QVariant | ambientOcclusion () const |
void | setAmbientOcclusion (const QVariant & ambientOcclusion ) |
通知程序信号:
void | ambientOcclusionChanged (const QVariant & ambientOcclusion ) |
Holds the current base color of the material. This can be either a plain color value or a texture. By default the value of this property is "grey".
访问函数:
QVariant | baseColor () const |
void | setBaseColor (const QVariant & baseColor ) |
通知程序信号:
void | baseColorChanged (const QVariant & baseColor ) |
Holds the current metalness level of the material, as a value between 0 (purely dielectric, the default) and 1 (purely metallic). This can be either a plain uniform value or a texture. By default the value of this property is 0.
访问函数:
QVariant | metalness () const |
void | setMetalness (const QVariant & metalness ) |
通知程序信号:
void | metalnessChanged (const QVariant & metalness ) |
Holds the current normal map texture of the material. This can only be a texture, otherwise it is ignored. By default this map is not set.
访问函数:
QVariant | normal () const |
void | setNormal (const QVariant & normal ) |
通知程序信号:
void | normalChanged (const QVariant & normal ) |
Holds the current roughness level of the material. This can be either a plain uniform value or a texture. By default the value of this property is 0.
访问函数:
QVariant | roughness () const |
void | setRoughness (const QVariant & roughness ) |
通知程序信号:
void | roughnessChanged (const QVariant & roughness ) |
Holds the current texture scale. It is applied as a multiplier to texture coordinates at render time. Defaults to 1.0.
When used in conjunction with QTextureWrapMode::Repeat, textureScale provides a simple way to tile a texture across a surface. For example, a texture scale of
4.0
would result in 16 (4x4) tiles.
访问函数:
float | textureScale () const |
void | setTextureScale (float textureScale ) |
通知程序信号:
void | textureScaleChanged (float textureScale ) |
构造新的 QMetalRoughMaterial instance with parent object parent .
[虚拟]
QMetalRoughMaterial::
~QMetalRoughMaterial
()
销毁 QMetalRoughMaterial 实例。