Documentation
¶
Overview ¶
Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsVisualShaderNode() Instance
- func (self Instance) ClearDefaultInputValues()
- func (self Instance) DefaultInputValues() []any
- func (self Instance) GetDefaultInputPort(atype PortType) int
- func (self Instance) GetInputPortDefaultValue(port int) any
- func (self Instance) ID() ID
- func (self Instance) LinkedParentGraphFrame() int
- func (self Instance) OutputPortForPreview() int
- func (self Instance) RemoveInputPortDefaultValue(port int)
- func (self Instance) SetDefaultInputValues(value []any)
- func (self Instance) SetInputPortDefaultValue(port int, value any)
- func (self Instance) SetLinkedParentGraphFrame(value int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOutputPortForPreview(value int)
- func (self Instance) Virtual(name string) reflect.Value
- type PortType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Expanded ¶
type Expanded [1]gdclass.VisualShaderNode
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsVisualShaderNode ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.VisualShaderNode
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsVisualShaderNode ¶
func (Instance) ClearDefaultInputValues ¶
func (self Instance) ClearDefaultInputValues()
Clears the default input ports value.
func (Instance) DefaultInputValues ¶
func (Instance) GetDefaultInputPort ¶
Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph.
func (Instance) GetInputPortDefaultValue ¶
Returns the default value of the input 'port'.
func (Instance) LinkedParentGraphFrame ¶
func (Instance) OutputPortForPreview ¶
func (Instance) RemoveInputPortDefaultValue ¶
Removes the default value of the input 'port'.
func (Instance) SetDefaultInputValues ¶
func (Instance) SetInputPortDefaultValue ¶
Sets the default 'value' for the selected input 'port'.
func (Instance) SetLinkedParentGraphFrame ¶
func (Instance) SetOutputPortForPreview ¶
type PortType ¶
type PortType int //gd:VisualShaderNode.PortType
const ( // Floating-point scalar. Translated to float type in shader code. PortTypeScalar PortType = 0 // Integer scalar. Translated to int type in shader code. PortTypeScalarInt PortType = 1 // Unsigned integer scalar. Translated to uint type in shader code. PortTypeScalarUint PortType = 2 // 2D vector of floating-point values. Translated to vec2 type in shader code. PortTypeVector2d PortType = 3 // 3D vector of floating-point values. Translated to vec3 type in shader code. PortTypeVector3d PortType = 4 // 4D vector of floating-point values. Translated to vec4 type in shader code. PortTypeVector4d PortType = 5 // Boolean type. Translated to bool type in shader code. PortTypeBoolean PortType = 6 // Transform type. Translated to mat4 type in shader code. PortTypeTransform PortType = 7 // Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. PortTypeSampler PortType = 8 // Represents the size of the [PortType] enum. PortTypeMax PortType = 9 )