Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AESContext
- AStar2D
- AStar3D
- AStarGrid2D
- AudioEffectInstance (1)
- AudioSample
- AudioSamplePlayback
- AudioStreamPlayback (5)
- CameraFeed
- CharFXTransform
- ConfigFile
- Crypto
- DTLSServer
- DirAccess
- ENetConnection
- EditorContextMenuPlugin
- EditorDebuggerPlugin
- EditorDebuggerSession
- EditorExportPlatform (6)
- EditorExportPlugin
- EditorExportPreset
- EditorFeatureProfile
- EditorFileSystemImportFormatSupportQuery
- EditorInspectorPlugin
- EditorResourceConversionPlugin
- EditorResourcePreviewGenerator
- EditorResourceTooltipPlugin
- EditorSceneFormatImporter (4)
- EditorScenePostImport
- EditorScenePostImportPlugin
- EditorScript
- EditorTranslationParserPlugin
- EncodedObjectAsID
- EngineProfiler
- Expression
- FileAccess
- GLTFObjectModelProperty
- HMACContext
- HTTPClient
- HashingContext
- ImageFormatLoader (1)
- JavaClass
- JavaObject
- JavaScriptObject
- KinematicCollision2D
- KinematicCollision3D
- Lightmapper (1)
- MeshConvexDecompositionSettings
- MeshDataTool
- MultiplayerAPI (2)
- Mutex
- NavigationPathQueryParameters2D
- NavigationPathQueryParameters3D
- NavigationPathQueryResult2D
- NavigationPathQueryResult3D
- Node3DGizmo (1)
- OggPacketSequencePlayback
- OpenXRAPIExtension
- PCKPacker
- PackedDataContainerRef
- PacketPeer (8)
- PhysicsPointQueryParameters2D
- PhysicsPointQueryParameters3D
- PhysicsRayQueryParameters2D
- PhysicsRayQueryParameters3D
- PhysicsShapeQueryParameters2D
- PhysicsShapeQueryParameters3D
- PhysicsTestMotionParameters2D
- PhysicsTestMotionParameters3D
- PhysicsTestMotionResult2D
- PhysicsTestMotionResult3D
- RDAttachmentFormat
- RDFramebufferPass
- RDPipelineColorBlendState
- RDPipelineColorBlendStateAttachment
- RDPipelineDepthStencilState
- RDPipelineMultisampleState
- RDPipelineRasterizationState
- RDPipelineSpecializationConstant
- RDSamplerState
- RDShaderSource
- RDTextureFormat
- RDTextureView
- RDUniform
- RDVertexAttribute
- RandomNumberGenerator
- RegEx
- RegExMatch
- RenderSceneBuffers (2)
- RenderSceneBuffersConfiguration
- Resource (103)
- ResourceFormatLoader
- ResourceFormatSaver
- ResourceImporter (16)
- SceneState
- SceneTreeTimer
- Semaphore
- SkinReference
- StreamPeer (5)
- SurfaceTool
- TCPServer
- TLSOptions
- TextLine
- TextParagraph
- TextServer (1)
- Thread
- TranslationDomain
- TriangleMesh
- Tween
- Tweener (5)
- UDPServer
- UPNP
- UPNPDevice
- WeakRef
- WebRTCPeerConnection (1)
- XMLParser
- XRInterface (4)
- XRPose
- XRTracker (2)
- ZIPPacker
- ZIPReader
- Animation
- AnimationLibrary
- AnimationNode (6)
- AnimationNodeStateMachinePlayback
- AnimationNodeStateMachineTransition
- AudioBusLayout
- AudioEffect (17)
- AudioStream (10)
- BitMap
- BoneMap
- ButtonGroup
- CameraAttributes (2)
- ColorPalette
- Compositor
- CompositorEffect
- CryptoKey
- Curve
- Curve2D
- Curve3D
- EditorNode3DGizmoPlugin
- EditorSettings
- Environment
- Font (3)
- GDExtension
- GLTFAccessor
- GLTFAnimation
- GLTFBufferView
- GLTFCamera
- GLTFDocument (1)
- GLTFDocumentExtension (1)
- GLTFLight
- GLTFMesh
- GLTFNode
- GLTFPhysicsBody
- GLTFPhysicsShape
- GLTFSkeleton
- GLTFSkin
- GLTFSpecGloss
- GLTFState (1)
- GLTFTexture
- GLTFTextureSampler
- Gradient
- Image
- ImporterMesh
- InputEvent (6)
- JSON
- LabelSettings
- LightmapGIData
- Material (9)
- Mesh (4)
- MeshLibrary
- MissingResource
- MultiMesh
- NavigationMesh
- NavigationMeshSourceGeometryData2D
- NavigationMeshSourceGeometryData3D
- NavigationPolygon
- Noise (1)
- Occluder3D (5)
- OccluderPolygon2D
- OggPacketSequence
- OpenXRAction
- OpenXRActionMap
- OpenXRActionSet
- OpenXRBindingModifier (2)
- OpenXRHapticBase (1)
- OpenXRIPBinding
- OpenXRInteractionProfile
- PackedDataContainer
- PackedScene
- PhysicsMaterial
- PolygonPathFinder
- RDShaderFile
- RDShaderSPIRV
- RichTextEffect
- SceneReplicationConfig
- Script (3)
- Shader (1)
- ShaderInclude
- Shape2D (8)
- Shape3D (9)
- Shortcut
- SkeletonModification2D (7)
- SkeletonModificationStack2D
- SkeletonProfile (1)
- Skin
- Sky
- SpriteFrames
- StyleBox (4)
- SyntaxHighlighter (2)
- Texture (3)
- Theme
- TileMapPattern
- TileSet
- TileSetSource (2)
- Translation (1)
- VideoStream (1)
- VideoStreamPlayback
- VisualShaderNode (62)
- VoxelGIData
- World2D
- World3D
- X509Certificate
- VisualShaderNodeBillboard
- VisualShaderNodeClamp
- VisualShaderNodeColorFunc
- VisualShaderNodeColorOp
- VisualShaderNodeCompare
- VisualShaderNodeConstant (9)
- VisualShaderNodeCubemap
- VisualShaderNodeCustom
- VisualShaderNodeDerivativeFunc
- VisualShaderNodeDeterminant
- VisualShaderNodeDistanceFade
- VisualShaderNodeDotProduct
- VisualShaderNodeFloatFunc
- VisualShaderNodeFloatOp
- VisualShaderNodeFresnel
- VisualShaderNodeIf
- VisualShaderNodeInput
- VisualShaderNodeIntFunc
- VisualShaderNodeIntOp
- VisualShaderNodeIs
- VisualShaderNodeLinearSceneDepth
- VisualShaderNodeMix
- VisualShaderNodeMultiplyAdd
- VisualShaderNodeOuterProduct
- VisualShaderNodeOutput (1)
- VisualShaderNodeParameter (10)
- VisualShaderNodeParameterRef
- VisualShaderNodeParticleAccelerator
- VisualShaderNodeParticleConeVelocity
- VisualShaderNodeParticleEmit
- VisualShaderNodeParticleEmitter (4)
- VisualShaderNodeParticleMultiplyByAxisAngle
- VisualShaderNodeParticleRandomness
- VisualShaderNodeProximityFade
- VisualShaderNodeRandomRange
- VisualShaderNodeRemap
- VisualShaderNodeReroute
- VisualShaderNodeResizableBase (4)
- VisualShaderNodeRotationByAxis
- VisualShaderNodeSDFRaymarch
- VisualShaderNodeSDFToScreenUV
- VisualShaderNodeSample3D (2)
- VisualShaderNodeScreenNormalWorldSpace
- VisualShaderNodeScreenUVToSDF
- VisualShaderNodeSmoothStep
- VisualShaderNodeStep
- VisualShaderNodeSwitch
- VisualShaderNodeTexture
- VisualShaderNodeTextureSDF
- VisualShaderNodeTextureSDFNormal
- VisualShaderNodeTransformCompose
- VisualShaderNodeTransformDecompose
- VisualShaderNodeTransformFunc
- VisualShaderNodeTransformOp
- VisualShaderNodeTransformVecMult
- VisualShaderNodeUIntFunc
- VisualShaderNodeUIntOp
- VisualShaderNodeUVFunc
- VisualShaderNodeUVPolarCoord
- VisualShaderNodeVarying (2)
- VisualShaderNodeVectorBase (8)
- VisualShaderNodeWorldPositionFromDepth
Table of contents
-
var linked_parent_graph_frame: int = -1 -
var output_port_for_preview: int = -1 -
func clear_default_input_values() -> void -
const func get_default_input_port(type: int enumVisualShaderNode.PortType) -> int -
const func get_default_input_values() -> Array -
const func get_input_port_default_value(port: int) -> Variant -
func remove_input_port_default_value(port: int) -> void -
func set_default_input_values(values: Array) -> void -
func set_input_port_default_value(prev_value: Variant = null) -> void -
const PORT_TYPE_SCALAR = 0 enum PortType -
const PORT_TYPE_SCALAR_INT = 1 enum PortType -
const PORT_TYPE_SCALAR_UINT = 2 enum PortType -
const PORT_TYPE_VECTOR_2D = 3 enum PortType -
const PORT_TYPE_VECTOR_3D = 4 enum PortType -
const PORT_TYPE_VECTOR_4D = 5 enum PortType -
const PORT_TYPE_BOOLEAN = 6 enum PortType -
const PORT_TYPE_TRANSFORM = 7 enum PortType -
const PORT_TYPE_SAMPLER = 8 enum PortType -
const PORT_TYPE_MAX = 9 enum PortType -
enum PortType
VisualShaderNode #
is_refcounted, resource, core, not_builtin_classes
Base class for VisualShader nodes. Not related to scene nodes.
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.
Members #
var linked_parent_graph_frame: int = -1#
Represents the index of the frame this node is linked to. If set to -1 the node is not linked to any frame.
var output_port_for_preview: int = -1#
Sets the output port index which will be showed for preview. If set to -1 no port will be open for preview.
Methods #
func clear_default_input_values() -> void#
Clears the default input ports value.
const func get_default_input_port(type: int enumVisualShaderNode.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.
const func get_default_input_values() -> Array#
Returns an Array containing default values for all of the input ports of the node in the form [index0, value0, index1, value1, ...].
const func get_input_port_default_value(port: int) -> Variant#
Returns the default value of the input port.
func remove_input_port_default_value(port: int) -> void#
Removes the default value of the input port.
func set_default_input_values(values: Array) -> void#
Sets the default input ports values using an Array of the form [index0, value0, index1, value1, ...]. For example: [0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)].
func set_input_port_default_value(prev_value: Variant = null) -> void#
Sets the default value for the selected input port.
Annotations #
Constants #
const PORT_TYPE_SCALAR = 0 enum PortType#
Floating-point scalar. Translated to [code skip-lint]float type in shader code.
const PORT_TYPE_SCALAR_INT = 1 enum PortType#
Integer scalar. Translated to [code skip-lint]int type in shader code.
const PORT_TYPE_SCALAR_UINT = 2 enum PortType#
Unsigned integer scalar. Translated to [code skip-lint]uint type in shader code.
const PORT_TYPE_VECTOR_2D = 3 enum PortType#
2D vector of floating-point values. Translated to [code skip-lint]vec2 type in shader code.
const PORT_TYPE_VECTOR_3D = 4 enum PortType#
3D vector of floating-point values. Translated to [code skip-lint]vec3 type in shader code.
const PORT_TYPE_VECTOR_4D = 5 enum PortType#
4D vector of floating-point values. Translated to [code skip-lint]vec4 type in shader code.
const PORT_TYPE_BOOLEAN = 6 enum PortType#
Boolean type. Translated to [code skip-lint]bool type in shader code.
const PORT_TYPE_TRANSFORM = 7 enum PortType#
Transform type. Translated to [code skip-lint]mat4 type in shader code.
const PORT_TYPE_SAMPLER = 8 enum PortType#
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
const PORT_TYPE_MAX = 9 enum PortType#
Represents the size of the PortType enum.
Constructors #
Enums #
PortType#
enum PortType {
PORT_TYPE_SCALAR = 0,
PORT_TYPE_SCALAR_INT = 1,
PORT_TYPE_SCALAR_UINT = 2,
PORT_TYPE_VECTOR_2D = 3,
PORT_TYPE_VECTOR_3D = 4,
PORT_TYPE_VECTOR_4D = 5,
PORT_TYPE_BOOLEAN = 6,
PORT_TYPE_TRANSFORM = 7,
PORT_TYPE_SAMPLER = 8,
PORT_TYPE_MAX = 9,
}