Inheritance #

RefCounted

- 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
Resource

- 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
VisualShaderNode

- 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

VisualShaderNodeTextureParameter #

is_refcounted, resource, core, not_builtin_classes

Performs a uniform texture lookup within the visual shader graph.

Performs a lookup operation on the texture provided as a uniform for the shader.

Members #

var color_default = COLOR_DEFAULT_WHITE#

Sets the default color if no texture is assigned to the uniform.

var texture_filter = FILTER_DEFAULT#

Sets the texture filtering mode. See TextureFilter for options.

var texture_repeat = REPEAT_DEFAULT#

Sets the texture repeating mode. See TextureRepeat for options.

var texture_source = SOURCE_NONE#

Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See TextureSource for options.

var texture_type = TYPE_DATA#

Defines the type of data provided by the source texture. See TextureType for options.

Methods #

Annotations #

Constants #

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_ANISOTROPY = 3 enum TextureType#

Adds hint_anisotropy as hint to the uniform declaration to use for a flowmap.

const TYPE_MAX = 4 enum TextureType#

Represents the size of the TextureType enum.

const COLOR_DEFAULT_WHITE = 0 enum ColorDefault#

Defaults to fully opaque white color.

const COLOR_DEFAULT_BLACK = 1 enum ColorDefault#

Defaults to fully opaque black color.

const COLOR_DEFAULT_TRANSPARENT = 2 enum ColorDefault#

Defaults to fully transparent black color.

const COLOR_DEFAULT_MAX = 3 enum ColorDefault#

Represents the size of the ColorDefault enum.

const FILTER_DEFAULT = 0 enum TextureFilter#

Sample the texture using the filter determined by the node this shader is attached to.

const FILTER_NEAREST = 1 enum TextureFilter#

The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).

const FILTER_LINEAR = 2 enum TextureFilter#

The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).

const FILTER_NEAREST_MIPMAP = 3 enum TextureFilter#

The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look pixelated from up close, and smooth from a distance.

Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.

const FILTER_LINEAR_MIPMAP = 4 enum TextureFilter#

The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look smooth from up close, and smooth from a distance.

Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.

const FILTER_NEAREST_MIPMAP_ANISOTROPIC = 5 enum TextureFilter#

The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

Note: This texture filter is rarely useful in 2D projects. FILTER_NEAREST_MIPMAP is usually more appropriate in this case.

const FILTER_LINEAR_MIPMAP_ANISOTROPIC = 6 enum TextureFilter#

The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

Note: This texture filter is rarely useful in 2D projects. FILTER_LINEAR_MIPMAP is usually more appropriate in this case.

const FILTER_MAX = 7 enum TextureFilter#

Represents the size of the TextureFilter enum.

const REPEAT_DEFAULT = 0 enum TextureRepeat#

Sample the texture using the repeat mode determined by the node this shader is attached to.

const REPEAT_ENABLED = 1 enum TextureRepeat#

Texture will repeat normally.

const REPEAT_DISABLED = 2 enum TextureRepeat#

Texture will not repeat.

const REPEAT_MAX = 3 enum TextureRepeat#

Represents the size of the TextureRepeat enum.

const SOURCE_NONE = 0 enum TextureSource#

The texture source is not specified in the shader.

const SOURCE_SCREEN = 1 enum TextureSource#

The texture source is the screen texture which captures all opaque objects drawn this frame.

const SOURCE_DEPTH = 2 enum TextureSource#

The texture source is the depth texture from the depth prepass.

const SOURCE_NORMAL_ROUGHNESS = 3 enum TextureSource#

The texture source is the normal-roughness buffer from the depth prepass.

const SOURCE_MAX = 4 enum TextureSource#

Represents the size of the TextureSource enum.

Constructors #

Enums #

TextureType#

enum TextureType { TYPE_DATA = 0, TYPE_COLOR = 1, TYPE_NORMAL_MAP = 2, TYPE_ANISOTROPY = 3, TYPE_MAX = 4, }

ColorDefault#

enum ColorDefault { COLOR_DEFAULT_WHITE = 0, COLOR_DEFAULT_BLACK = 1, COLOR_DEFAULT_TRANSPARENT = 2, COLOR_DEFAULT_MAX = 3, }

TextureFilter#

enum TextureFilter { FILTER_DEFAULT = 0, FILTER_NEAREST = 1, FILTER_LINEAR = 2, FILTER_NEAREST_MIPMAP = 3, FILTER_LINEAR_MIPMAP = 4, FILTER_NEAREST_MIPMAP_ANISOTROPIC = 5, FILTER_LINEAR_MIPMAP_ANISOTROPIC = 6, FILTER_MAX = 7, }

TextureRepeat#

enum TextureRepeat { REPEAT_DEFAULT = 0, REPEAT_ENABLED = 1, REPEAT_DISABLED = 2, REPEAT_MAX = 3, }

TextureSource#

enum TextureSource { SOURCE_NONE = 0, SOURCE_SCREEN = 1, SOURCE_DEPTH = 2, SOURCE_NORMAL_ROUGHNESS = 3, SOURCE_MAX = 4, }

Operators #

Signals #

Theme Items #

Tutorials #