Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
TextureFilter
VisualShaderNodeTextureParameter.swift:60enum TextureFilter
Cases
case `default`
Sample the texture using the filter determined by the node this shader is attached to.
case nearest
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
case linear
The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
case nearestMipmap
The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps.
case linearMipmap
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to
Camera2D
zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.case nearestMipmapAnisotropic
The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting
ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel
.case linearMipmapAnisotropic
The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting
ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel
.case max
Represents the size of the
TextureFilter
enum.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (10) members.
Types
Type members
Instance members
var colorDefault: VisualShaderNodeTextureParameter.ColorDefault
Sets the default color if no texture is assigned to the uniform.
var textureFilter: VisualShaderNodeTextureParameter.TextureFilter
Sets the texture filtering mode. See
TextureFilter
for options.var textureRepeat: VisualShaderNodeTextureParameter.TextureRepeat
Sets the texture repeating mode. See
TextureRepeat
for options.var textureSource: VisualShaderNodeTextureParameter.TextureSource
Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See
TextureSource
for options.var textureType: VisualShaderNodeTextureParameter.TextureType
Defines the type of data provided by the source texture. See
TextureType
for options.
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.