Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
GType
VisualShader.swift:13enum GType
Cases
case vertex
A vertex shader, operating on vertices.
case fragment
A fragment shader, operating on fragments (pixels).
case light
A shader for light calculations.
case start
A function for the “start” stage of particle shader.
case process
A function for the “process” stage of particle shader.
case collide
A function for the “collide” stage (particle collision handler) of particle shader.
case startCustom
A function for the “start” stage of particle shader, with customized output.
case processCustom
A function for the “process” stage of particle shader, with customized output.
case sky
A shader for 3D environment’s sky.
case fog
A compute shader that runs for each froxel of the volumetric fog map.
case max
Represents the size of the
VisualShader/Type
enum.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (24) members.
Types
Type members
static let nodeIdInvalid: Int
Denotes invalid
VisualShader
node.static let nodeIdOutput: Int
Denotes output node of
VisualShader
.class var godotClassName: StringName
Instance members
var graphOffset: Vector2
The offset vector of the whole graph.
func addNode(type: VisualShader.GType, node: VisualShaderNode?, position: Vector2, id: Int32
) Adds the specified
node
to the shader.func addVarying(name: String, mode: VisualShader.VaryingMode, type: VisualShader.VaryingType
) Adds a new varying value node to the shader.
func canConnectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> Bool Returns
true
if the specified nodes and ports can be connected together.func connectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> GodotError Connects the specified nodes and ports.
func connectNodesForced(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) Connects the specified nodes and ports, even if they can’t be connected. Such connection is invalid and will not function properly.
func disconnectNodes(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) Connects the specified nodes and ports.
func getNode(type: VisualShader.GType, id: Int32
) -> VisualShaderNode? Returns the shader node instance with specified
type
andid
.func getNodeConnections(type: VisualShader.GType
) -> VariantCollection<GDictionary> Returns the list of connected nodes with the specified type.
func getNodeList(type: VisualShader.GType
) -> PackedInt32Array Returns the list of all nodes in the shader with the specified type.
func getNodePosition(type: VisualShader.GType, id: Int32
) -> Vector2 Returns the position of the specified node within the shader graph.
func getValidNodeId(type: VisualShader.GType
) -> Int32 Returns next valid node ID that can be added to the shader graph.
func hasVarying(name: String
) -> Bool Returns
true
if the shader has a varying with the givenname
.func isNodeConnection(type: VisualShader.GType, fromNode: Int32, fromPort: Int32, toNode: Int32, toPort: Int32
) -> Bool Returns
true
if the specified node and port connection exist.func removeNode(type: VisualShader.GType, id: Int32
) Removes the specified node from the shader.
func removeVarying(name: String
) Removes a varying value node with the given
name
. Prints an error if a node with this name is not found.func replaceNode(type: VisualShader.GType, id: Int32, newClass: StringName
) Replaces the specified node with a node of new class type.
func setMode(Shader.Mode
) Sets the mode of this shader.
func setNodePosition(type: VisualShader.GType, id: Int32, position: Vector2
) Sets the position of the specified node.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.