Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

VisualShaderNodeTextureParameter

Hérite de : VisualShaderNodeParameter < VisualShaderNode < Resource < RefCounted < Object

Hérité par : VisualShaderNodeCubemapParameter, VisualShaderNodeTexture2DArrayParameter, VisualShaderNodeTexture2DParameter, VisualShaderNodeTexture3DParameter, VisualShaderNodeTextureParameterTriplanar

Effectue une recherche de texture de type uniform dans le graphe de shader visuel.

Description

Effectue une opération de recherche sur la texture fournie comme uniform pour le shader.

Propriétés

ColorDefault

color_default

0

TextureFilter

texture_filter

0

TextureRepeat

texture_repeat

0

TextureSource

texture_source

0

TextureType

texture_type

0


Énumérations

enum TextureType: 🔗

TextureType TYPE_DATA = 0

Aucun indice n'a été ajouté à la déclaration de l'uniform.

TextureType TYPE_COLOR = 1

Adds source_color as hint to the uniform declaration for proper conversion from nonlinear sRGB encoding to linear encoding.

TextureType TYPE_NORMAL_MAP = 2

Ajoute hint_normal comme indication de la déclaration d'uniform, qui convertit en interne la texture pour l'utiliser de manière appropriée comme normal map.

TextureType TYPE_ANISOTROPY = 3

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

TextureType TYPE_MAX = 4

Représente la taille de l’énumération TextureType.


enum ColorDefault: 🔗

ColorDefault COLOR_DEFAULT_WHITE = 0

Defaults to fully opaque white color.

ColorDefault COLOR_DEFAULT_BLACK = 1

Defaults to fully opaque black color.

ColorDefault COLOR_DEFAULT_TRANSPARENT = 2

Defaults to fully transparent black color.

ColorDefault COLOR_DEFAULT_MAX = 3

Représente la taille de l'énumération ColorDefault.


enum TextureFilter: 🔗

TextureFilter FILTER_DEFAULT = 0

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

TextureFilter FILTER_NEAREST = 1

Le filtrage de texture lit le pixel le plus proche seulement. Cela rend la texture pixelisée de loin, et granuleuse à une certaine distance (à cause des mipmaps qui ne sont pas échantillonnées).

TextureFilter FILTER_LINEAR = 2

Le filtrage de texture mélange les 4 pixels les plus proches. Cela rend la texture lisse de près, et granuleuse à une certaine distance (à cause des mipmaps qui ne sont pas échantillonnées).

TextureFilter FILTER_NEAREST_MIPMAP = 3

Le filtrage de texture lit à partir du pixel le plus proche et fusionne les deux mipmaps les plus proches (ou utilise la mipmap le plus proche si ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter vaut true). Cela donne à la texture un aspect pixelisé de près et lisse de loin.

Utilisez ce filtre pour les textures non pixel art susceptibles d'être visualisées à petite échelle (par exemple, à cause du zoom d'une Camera2D ou à la mise à l'échelle des sprites), car les mipmaps sont importantes pour lisser les pixels qui sont plus petits que les pixels à l'écran.

TextureFilter FILTER_LINEAR_MIPMAP = 4

Le filtrage de texture fusionne les 4 pixels les plus proches et les 2 mipmaps les plus proches (ou utilise la mipmap le plus proche si ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter est true). Cela rend la texture lisse de près et lisse de loin.

Utilisez ce filtre pour les textures non pixel art susceptibles d'être visualisées à petite échelle (par exemple, grâce au zoom d'une Camera2D ou à la mise à l'échelle du sprite), car les mipmaps sont importantes pour lisser les pixels plus petits que ceux à l'écran.

TextureFilter FILTER_NEAREST_MIPMAP_ANISOTROPIC = 5

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.

TextureFilter FILTER_LINEAR_MIPMAP_ANISOTROPIC = 6

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.

TextureFilter FILTER_MAX = 7

Représente la taille de l’énumération TextureFilter.


enum TextureRepeat: 🔗

TextureRepeat REPEAT_DEFAULT = 0

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

TextureRepeat REPEAT_ENABLED = 1

La texture va se répéter normalement.

TextureRepeat REPEAT_DISABLED = 2

La texture ne de répétera pas.

TextureRepeat REPEAT_MAX = 3

Représente la taille de l’énumération TextureRepeat.


enum TextureSource: 🔗

TextureSource SOURCE_NONE = 0

The texture source is not specified in the shader.

TextureSource SOURCE_SCREEN = 1

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

TextureSource SOURCE_DEPTH = 2

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

TextureSource SOURCE_NORMAL_ROUGHNESS = 3

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

TextureSource SOURCE_MAX = 4

Représente la taille de l’énumération TextureSource.


Descriptions des propriétés

ColorDefault color_default = 0 🔗

Définit la couleur par défaut si aucune texture n'est affectée à l'uniform.


TextureFilter texture_filter = 0 🔗

Sets the texture filtering mode.


TextureRepeat texture_repeat = 0 🔗

Sets the texture repeating mode.


TextureSource texture_source = 0 🔗

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


TextureType texture_type = 0 🔗

Définit le type de données fournies par la texture source.