Up to date

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

VisualShaderNodeInput

继承: VisualShaderNode < Resource < RefCounted < Object

在可视化着色器图中,代表输入着色器参数。

描述

提供对着色器可用的输入变量(内置)的访问。关于每种着色器类型的可用内置变量列表,请参阅着色器参考(查看教程部分的链接)。

教程

属性

String

input_name

"[None]"

方法

String

get_input_real_name ( ) const


信号

input_type_changed ( )

通过 input_name 更改输入时发出。


属性说明

String input_name = "[None]"

  • void set_input_name ( String value )

  • String get_input_name ( )

小写风格的输入常量之一,例如:"vertex"(VERTEX)或 "point_size"(POINT_SIZE)。


方法说明

String get_input_real_name ( ) const

返回当前常量名称翻译至 Godot 着色器语言后的名称。例如,如果 input_name 等于 "albedo",则返回 "ALBEDO"