Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

GLTFSpecGloss

继承: Resource < RefCounted < Object

已归档的 GLTF 扩展,用于镜面/光泽材质。

描述

KHR_materials_pbrSpecularGlossiness 是一个已归档的 GLTF 扩展。这意味着它已被弃用,不推荐用于新文件。但是,它仍然被支持用于加载旧文件。

教程

属性

Color

diffuse_factor

Color(1, 1, 1, 1)

Image

diffuse_img

float

gloss_factor

1.0

Image

spec_gloss_img

Color

specular_factor

Color(1, 1, 1, 1)


属性说明

Color diffuse_factor = Color(1, 1, 1, 1)

  • void set_diffuse_factor ( Color value )

  • Color get_diffuse_factor ( )

该材质反射漫反射系数。


Image diffuse_img

  • void set_diffuse_img ( Image value )

  • Image get_diffuse_img ( )

漫反射纹理。


float gloss_factor = 1.0

  • void set_gloss_factor ( float value )

  • float get_gloss_factor ( )

材质的光泽度或光滑度。


Image spec_gloss_img

  • void set_spec_gloss_img ( Image value )

  • Image get_spec_gloss_img ( )

镜面光泽度纹理。


Color specular_factor = Color(1, 1, 1, 1)

  • void set_specular_factor ( Color value )

  • Color get_specular_factor ( )

材质的镜面反射 RGB 颜色。不使用 Alpha 通道。