VisualShaderNode

package
v0.0.0-...-0d6c339 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 23 Imported by: 0

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

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 Any

type Any interface {
	gd.IsClass
	AsVisualShaderNode() Instance
}

type Expanded

type Expanded [1]gdclass.VisualShaderNode

func (Expanded) SetInputPortDefaultValue

func (self Expanded) SetInputPortDefaultValue(port int, value any, prev_value any)

Sets the default 'value' for the selected input 'port'.

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

func (*Extension[T]) AsVisualShaderNode

func (self *Extension[T]) AsVisualShaderNode() Instance

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) AsVisualShaderNode

func (self Instance) AsVisualShaderNode() Instance

func (Instance) ClearDefaultInputValues

func (self Instance) ClearDefaultInputValues()

Clears the default input ports value.

func (Instance) DefaultInputValues

func (self Instance) DefaultInputValues() []any

func (Instance) GetDefaultInputPort

func (self Instance) GetDefaultInputPort(atype PortType) int

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

func (self Instance) GetInputPortDefaultValue(port int) any

Returns the default value of the input 'port'.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) LinkedParentGraphFrame

func (self Instance) LinkedParentGraphFrame() int

func (Instance) OutputPortForPreview

func (self Instance) OutputPortForPreview() int

func (Instance) RemoveInputPortDefaultValue

func (self Instance) RemoveInputPortDefaultValue(port int)

Removes the default value of the input 'port'.

func (Instance) SetDefaultInputValues

func (self Instance) SetDefaultInputValues(value []any)

func (Instance) SetInputPortDefaultValue

func (self Instance) SetInputPortDefaultValue(port int, value any)

Sets the default 'value' for the selected input 'port'.

func (Instance) SetLinkedParentGraphFrame

func (self Instance) SetLinkedParentGraphFrame(value int)

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetOutputPortForPreview

func (self Instance) SetOutputPortForPreview(value int)

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL