Inherits: Shader < Resource < Reference < Object
A custom shader program with a visual editor.
This class allows you to define a custom shader program that can be used for various materials to render objects.
The visual shader editor creates the shader.
Vector2 | graph_offset | Vector2( 0, 0 ) |
void | add_node ( Type type, VisualShaderNode node, Vector2 position, int id ) |
bool | can_connect_nodes ( Type type, int from_node, int from_port, int to_node, int to_port ) const |
Error | connect_nodes ( Type type, int from_node, int from_port, int to_node, int to_port ) |
void | connect_nodes_forced ( Type type, int from_node, int from_port, int to_node, int to_port ) |
void | disconnect_nodes ( Type type, int from_node, int from_port, int to_node, int to_port ) |
VisualShaderNode | get_node ( Type type, int id ) const |
Array | get_node_connections ( Type type ) const |
PoolIntArray | get_node_list ( Type type ) const |
Vector2 | get_node_position ( Type type, int id ) const |
int | get_valid_node_id ( Type type ) const |
bool | is_node_connection ( Type type, int from_node, int from_port, int to_node, int to_port ) const |
void | remove_node ( Type type, int id ) |
void | set_mode ( Mode mode ) |
void | set_node_position ( Type type, int id, Vector2 position ) |
enum Type:
Default | Vector2( 0, 0 ) |
Setter | set_graph_offset(value) |
Getter | get_graph_offset() |
The offset vector of the whole graph.
Adds the specified node to the shader.
Returns true
if the specified nodes and ports can be connected together.
Connects the specified nodes and ports.
Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly.
Connects the specified nodes and ports.
Returns the shader node instance with specified type
and id
.
Returns the list of connected nodes with the specified type.
Returns the list of all nodes in the shader with the specified type.
Returns the position of the specified node within the shader graph.
Returns true
if the specified node and port connection exist.
Removes the specified node from the shader.
Sets the mode of this shader.
Sets the position of the specified node.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_visualshader.html