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 source = SOURCE_TEXTURE -
var texture: Texture2D -
var texture_type = TYPE_DATA -
const SOURCE_TEXTURE = 0 enum Source -
const SOURCE_SCREEN = 1 enum Source -
const SOURCE_2D_TEXTURE = 2 enum Source -
const SOURCE_2D_NORMAL = 3 enum Source -
const SOURCE_DEPTH = 4 enum Source -
const SOURCE_PORT = 5 enum Source -
const SOURCE_3D_NORMAL = 6 enum Source -
const SOURCE_ROUGHNESS = 7 enum Source -
const SOURCE_MAX = 8 enum Source -
const TYPE_DATA = 0 enum TextureType -
const TYPE_COLOR = 1 enum TextureType -
const TYPE_NORMAL_MAP = 2 enum TextureType -
const TYPE_MAX = 3 enum TextureType -
enum Source -
enum TextureType
VisualShaderNodeTexture #
is_refcounted, is_instantiable, resource, core, not_builtin_classes
Performs a 2D texture lookup within the visual shader graph.
Performs a lookup operation on the provided texture, with support for multiple texture sources to choose from.
Members #
var source = SOURCE_TEXTURE#
Determines the source for the lookup. See Source for options.
var texture: Texture2D#
The source texture, if needed for the selected source.
var texture_type = TYPE_DATA#
Specifies the type of the texture if source is set to SOURCE_TEXTURE. See TextureType for options.
Methods #
Annotations #
Constants #
const SOURCE_TEXTURE = 0 enum Source#
Use the texture given as an argument for this function.
const SOURCE_SCREEN = 1 enum Source#
Use the current viewport's texture as the source.
const SOURCE_2D_TEXTURE = 2 enum Source#
Use the texture from this shader's texture built-in (e.g. a texture of a Sprite2D).
const SOURCE_2D_NORMAL = 3 enum Source#
Use the texture from this shader's normal map built-in.
const SOURCE_DEPTH = 4 enum Source#
Use the depth texture captured during the depth prepass. Only available when the depth prepass is used (i.e. in spatial shaders and in the forward_plus or gl_compatibility renderers).
const SOURCE_PORT = 5 enum Source#
Use the texture provided in the input port for this function.
const SOURCE_3D_NORMAL = 6 enum Source#
Use the normal buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
const SOURCE_ROUGHNESS = 7 enum Source#
Use the roughness buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
const SOURCE_MAX = 8 enum Source#
Represents the size of the Source enum.
const TYPE_DATA = 0 enum TextureType#
No hints are added to the uniform declaration.
const TYPE_COLOR = 1 enum TextureType#
Adds source_color as hint to the uniform declaration for proper sRGB to linear conversion.
const TYPE_NORMAL_MAP = 2 enum TextureType#
Adds hint_normal as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
const TYPE_MAX = 3 enum TextureType#
Represents the size of the TextureType enum.
Constructors #
Enums #
Source#
enum Source {
SOURCE_TEXTURE = 0,
SOURCE_SCREEN = 1,
SOURCE_2D_TEXTURE = 2,
SOURCE_2D_NORMAL = 3,
SOURCE_DEPTH = 4,
SOURCE_PORT = 5,
SOURCE_3D_NORMAL = 6,
SOURCE_ROUGHNESS = 7,
SOURCE_MAX = 8,
}TextureType#
enum TextureType {
TYPE_DATA = 0,
TYPE_COLOR = 1,
TYPE_NORMAL_MAP = 2,
TYPE_MAX = 3,
}