Function VisualShaderNodeCustom._getCode
Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the ""
multiline string construct can be used for convenience).
The input_vars
and output_vars
arrays contain the string names of the various input and output variables, as defined by _get_input_*
and _get_output_*
virtual methods in this class.
The output ports can be assigned values in the shader code. For example, return output_varsclass="pln">D 0 + " = " + input_varsclass="pln">D 0 + ";"
.
You can customize the generated code based on the shader mode
(see Shader
) and/or type
(see VisualShader
).
Defining this method is required.