本页内容

PhongMaterial QML Type

PhongMaterial 类提供了 Phong 光照效果的默认实现。更多内容...

Import Statement: import Qt3D.Extras 2.12
Inherits:

Material

Status: Deprecated

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

属性

详细说明

Phong 光照效果基于环境光、漫反射光和镜面反射光这三个光照成分的组合。这些成分的相对强度通过其反射系数来控制,这些系数以 RGB 三元组的形式进行建模:

  • 环境光是指在没有其他光源的情况下,物体自身发出的颜色。
  • 漫反射是指粗糙表面在光线照射下产生的反射颜色。
  • 镜面反射是指光线在光滑表面上反射时发出的颜色。
  • 表面的光泽度由一个浮点属性控制。

该材质采用单渲染通道的方法,并执行基于片段的照明计算。提供了适用于 OpenGL 2、OpenGL 3 或更高版本以及 OpenGL ES 2 的技术实现。

属性文档

ambient : color

保存当前的环境颜色。

diffuse : color

保存当前的漫反射颜色。

shininess : real

保持当前的光泽度。

specular : color

存储当前的镜面颜色。

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