A custom shader program with a visual editor.
This class provides a graph-like visual editor for creating a Shader. Although VisualShaders do not require coding, they share the same logic with script shaders. They use VisualShaderNodes that can be connected to each other to control the flow of the shader. The visual shader graph is converted to a script shader behind the scenes.
Adds a new varying value 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 true if the specified node and port connection exist.
Removes a varying value node with the given name. Prints an error if a node with this name is not found.
TYPE_VERTEX = 0A vertex shader, operating on vertices.
TYPE_FRAGMENT = 1A fragment shader, operating on fragments (pixels).
TYPE_LIGHT = 2A shader for light calculations.
TYPE_START = 3A function for the "start" stage of particle shader.
TYPE_PROCESS = 4A function for the "process" stage of particle shader.
TYPE_COLLIDE = 5A function for the "collide" stage (particle collision handler) of particle shader.
TYPE_START_CUSTOM = 6A function for the "start" stage of particle shader, with customized output.
TYPE_PROCESS_CUSTOM = 7A function for the "process" stage of particle shader, with customized output.
TYPE_SKY = 8A shader for 3D environment's sky.
TYPE_FOG = 9A compute shader that runs for each froxel of the volumetric fog map.
TYPE_TEXTURE_BLIT = 10A shader used to process blit calls to a DrawableTexture.
TYPE_MAX = 11Represents the size of the Type enum.
VARYING_MODE_VERTEX_TO_FRAG_LIGHT = 0Varying is passed from Vertex function to Fragment and Light functions.
VARYING_MODE_FRAG_TO_LIGHT = 1Varying is passed from Fragment function to Light function.
VARYING_MODE_MAX = 2Represents the size of the VaryingMode enum.
VARYING_TYPE_FLOAT = 0Varying is of type float.
VARYING_TYPE_INT = 1Varying is of type int.
VARYING_TYPE_UINT = 2Varying is of type unsigned int.
VARYING_TYPE_VECTOR_2D = 3Varying is of type Vector2.
VARYING_TYPE_VECTOR_3D = 4Varying is of type Vector3.
VARYING_TYPE_VECTOR_4D = 5Varying is of type Vector4.
VARYING_TYPE_BOOLEAN = 6Varying is of type bool.
VARYING_TYPE_TRANSFORM = 7Varying is of type Transform3D.
VARYING_TYPE_MAX = 8Represents the size of the VaryingType enum.