本页内容

MetalRoughMaterial QML Type

该材质采用单渲染通道的方法实现特效,并执行基于片段的光照计算。提供了适用于 OpenGL 3 和 OpenGL ES 3 的实现技术。更多内容...

Import Statement: import Qt3D.Extras 2.12
In C++: QMetalRoughMaterial
Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

详细说明

物业文件

ambientOcclusion : Texture

存储材质当前的环境遮蔽贴图。此处只能是贴图,否则将被忽略。默认情况下,该贴图未设置。

baseColor : variant

保存材质的当前底色。该值可以是纯色值,也可以是纹理。默认情况下,该属性的值为“灰色”。

metalness : variant

存储该材质的当前金属度,数值范围在 0(纯介电,默认值)到 1(纯金属)之间。该值可以是简单的均匀数值,也可以是纹理。默认情况下,该属性的值为 0。

normal : Texture

存储材质当前的法线贴图。此处只能是贴图,否则将被忽略。默认情况下,该贴图未设置。

roughness : variant

保存材质的当前粗糙度级别。该值可以是普通的均匀数值,也可以是纹理。默认情况下,该属性的值为 0。

textureScale : real

保存当前的纹理缩放比例。渲染时,该值将作为乘数应用于纹理坐标。默认值为 1.0。

与 WrapMode.Repeat 结合使用时,textureScale 提供了一种在表面上平铺纹理的简便方法。例如,当纹理缩放比例设置为4.0 时,将生成 16 个(4x4)平铺块。

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