Click or drag to resize

VisualShaderNodeCustom_GetGlobalCode Method

Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the """ multiline string construct can be used for convenience).

Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names.

You can customize the generated code based on the shader mode (see ShaderMode).

Defining this method is optional.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public virtual string _GetGlobalCode(
	int mode
)

Parameters

mode
Type: SystemInt32

[Missing <param name="mode"/> documentation for "M:Godot.VisualShaderNodeCustom._GetGlobalCode(System.Int32)"]

Return Value

Type: String

[Missing <returns> documentation for "M:Godot.VisualShaderNodeCustom._GetGlobalCode(System.Int32)"]

See Also