NormalDiffuseMapMaterial QML Type
NormalDiffuseMapMaterial 提供了 Phong 照明和凹凸效果的默认实现,其中漫反射光分量从纹理贴图中读取,而待渲染网格的法线则从法线贴图中读取。更多内容...
| Import Statement: | import Qt3D.Extras 2.12 |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- ambient : color
- diffuse : TextureImage
- normal : TextureImage
- shininess : real
- specular : color
- textureScale : real
详细说明
镜面反射光效基于环境光、漫反射光和镜面反射光这三个光照成分的组合。这些成分的相对强度通过其反射系数来控制,这些系数以RGB三元组的形式进行建模:
- 环境光是指在没有其他光源的情况下,物体自身发出的颜色。
- 漫反射是指粗糙表面在光线照射下产生的反射颜色。
- 镜面反射是指光线在光亮表面上反射时呈现的颜色。
- 表面的光泽度由一个浮点属性控制。
该材质采用单渲染通道的方法,并执行基于片段的照明计算。提供了适用于 OpenGL 2、OpenGL 3 或更高版本以及 OpenGL ES 2 的技术实现。
属性文档
ambient : color
保存当前的环境颜色。
diffuse : TextureImage
存储当前的漫反射贴图。
默认情况下,漫反射纹理具有以下属性:
- 线性缩放滤波器
- 启用Mipmap的线性Mipmap
- 循环平铺模式
- 最大各向异性系数为 16.0
normal : TextureImage
存储当前的法线贴图。
默认情况下,法线贴图具有以下属性:
- 线性缩放和放大滤镜
- 循环平铺模式
- 最大各向异性值为 16.0
shininess : real
保持当前的光泽度。
specular : color
存储当前的镜面反射颜色。
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.