Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

VisualShaderNodeCustom

Inherits: VisualShaderNode < Resource < RefCounted < Object

Virtual class to define custom VisualShaderNodes for use in the Visual Shader Editor.

Description

By inheriting this class you can create a custom VisualShader script addon which will be automatically added to the Visual Shader Editor. The VisualShaderNode's behavior is defined by overriding the provided virtual methods.

In order for the node to be registered as an editor addon, you must use the @tool annotation and provide a class_name for your custom script. For example:

@tool
extends VisualShaderNodeCustom
class_name VisualShaderNodeNoise

Tutorials

Methods

String

_get_category() virtual const

String

_get_code(input_vars: Array[String], output_vars: Array[String], mode: Mode, type: Type) virtual const

int

_get_default_input_port(type: PortType) virtual const

String

_get_description() virtual const

String

_get_func_code(mode: Mode, type: Type) virtual const

String

_get_global_code(mode: Mode) virtual const

int

_get_input_port_count() virtual const

Variant

_get_input_port_default_value(port: int) virtual const

String

_get_input_port_name(port: int) virtual const

PortType

_get_input_port_type(port: int) virtual const

String

_get_name() virtual const

int

_get_output_port_count() virtual const

String

_get_output_port_name(port: int) virtual const

PortType

_get_output_port_type(port: int) virtual const

int

_get_property_count() virtual const

int

_get_property_default_index(index: int) virtual const

String

_get_property_name(index: int) virtual const

PackedStringArray

_get_property_options(index: int) virtual const

PortType

_get_return_icon_type() virtual const

bool

_is_available(mode: Mode, type: Type) virtual const

bool

_is_highend() virtual const

int

get_option_index(option: int)