VisualShaderNodeParameter
Inherits: VisualShaderNode < Resource < RefCounted < Object
Inherited by: VisualShaderNodeBooleanParameter, VisualShaderNodeColorParameter, VisualShaderNodeFloatParameter, VisualShaderNodeIntParameter, VisualShaderNodeTextureParameter, VisualShaderNodeTransformParameter, VisualShaderNodeUIntParameter, VisualShaderNodeVec2Parameter, VisualShaderNodeVec3Parameter, VisualShaderNodeVec4Parameter
Description
Section titled “Description”A base type for the parameters within the visual shader graph.
A parameter represents a variable in the shader which is set externally, i.e. from the ShaderMaterial. Parameters are exposed as properties in the ShaderMaterial and can be assigned from the Inspector or from a script.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| int | instance_index |
0 |
| String | parameter_name |
"" |
| Qualifier | qualifier |
0 |
Enumerations
Section titled “Enumerations”Qualifier
enum Qualifier
QUAL_NONE = 0
The parameter will be tied to the ShaderMaterial using this shader.
QUAL_GLOBAL = 1
The parameter will use a global value, defined in Project Settings.
QUAL_INSTANCE = 2
The parameter will be tied to the node with attached ShaderMaterial using this shader.
QUAL_INSTANCE_INDEX = 3
The parameter will be tied to the node with attached ShaderMaterial using this shader. Enables setting a instance_index property.
QUAL_MAX = 4
Represents the size of the Qualifier enum.
Property descriptions
Section titled “Property descriptions”instance_index
int instance_index = 0
The index within 0-15 range, which is used to avoid clashes when shader used on multiple materials.
parameter_name
String parameter_name = ""
Name of the parameter, by which it can be accessed through the ShaderMaterial properties.
qualifier
Qualifier qualifier = 0
Defines the scope of the parameter.
