Documentation
¶
Overview ¶
Performs a lookup operation on the texture provided as a uniform for the shader.
Index ¶
- type Advanced
- type Any
- type ColorDefault
- type Extension
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- func (self *Extension[T]) AsVisualShaderNode() VisualShaderNode.Instance
- func (self *Extension[T]) AsVisualShaderNodeParameter() VisualShaderNodeParameter.Instance
- func (self *Extension[T]) AsVisualShaderNodeTextureParameter() Instance
- type ID
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AsVisualShaderNode() VisualShaderNode.Instance
- func (self Instance) AsVisualShaderNodeParameter() VisualShaderNodeParameter.Instance
- func (self Instance) AsVisualShaderNodeTextureParameter() Instance
- func (self Instance) ColorDefault() ColorDefault
- func (self Instance) ID() ID
- func (self Instance) SetColorDefault(value ColorDefault)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetTextureFilter(value TextureFilter)
- func (self Instance) SetTextureRepeat(value TextureRepeat)
- func (self Instance) SetTextureSource(value TextureSource)
- func (self Instance) SetTextureType(value TextureType)
- func (self Instance) TextureFilter() TextureFilter
- func (self Instance) TextureRepeat() TextureRepeat
- func (self Instance) TextureSource() TextureSource
- func (self Instance) TextureType() TextureType
- func (self Instance) Virtual(name string) reflect.Value
- type TextureFilter
- type TextureRepeat
- type TextureSource
- type TextureType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type ColorDefault ¶
type ColorDefault int //gd:VisualShaderNodeTextureParameter.ColorDefault
const ( // Defaults to fully opaque white color. ColorDefaultWhite ColorDefault = 0 // Defaults to fully opaque black color. ColorDefaultBlack ColorDefault = 1 // Defaults to fully transparent black color. ColorDefaultTransparent ColorDefault = 2 // Represents the size of the [ColorDefault] enum. ColorDefaultMax ColorDefault = 3 )
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
func (*Extension[T]) AsVisualShaderNode ¶
func (self *Extension[T]) AsVisualShaderNode() VisualShaderNode.Instance
func (*Extension[T]) AsVisualShaderNodeParameter ¶
func (self *Extension[T]) AsVisualShaderNodeParameter() VisualShaderNodeParameter.Instance
func (*Extension[T]) AsVisualShaderNodeTextureParameter ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.VisualShaderNodeTextureParameter
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) AsVisualShaderNode ¶
func (self Instance) AsVisualShaderNode() VisualShaderNode.Instance
func (Instance) AsVisualShaderNodeParameter ¶
func (self Instance) AsVisualShaderNodeParameter() VisualShaderNodeParameter.Instance
func (Instance) AsVisualShaderNodeTextureParameter ¶
func (Instance) ColorDefault ¶
func (self Instance) ColorDefault() ColorDefault
func (Instance) SetColorDefault ¶
func (self Instance) SetColorDefault(value ColorDefault)
func (Instance) SetTextureFilter ¶
func (self Instance) SetTextureFilter(value TextureFilter)
func (Instance) SetTextureRepeat ¶
func (self Instance) SetTextureRepeat(value TextureRepeat)
func (Instance) SetTextureSource ¶
func (self Instance) SetTextureSource(value TextureSource)
func (Instance) SetTextureType ¶
func (self Instance) SetTextureType(value TextureType)
func (Instance) TextureFilter ¶
func (self Instance) TextureFilter() TextureFilter
func (Instance) TextureRepeat ¶
func (self Instance) TextureRepeat() TextureRepeat
func (Instance) TextureSource ¶
func (self Instance) TextureSource() TextureSource
func (Instance) TextureType ¶
func (self Instance) TextureType() TextureType
type TextureFilter ¶
type TextureFilter int //gd:VisualShaderNodeTextureParameter.TextureFilter
const ( // Sample the texture using the filter determined by the node this shader is attached to. FilterDefault TextureFilter = 0 // 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). FilterNearest TextureFilter = 1 // 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). FilterLinear TextureFilter = 2 // 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. // // [Camera2D]: https://pkg.go.dev/graphics.gd/classdb/Camera2D // [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings FilterNearestMipmap TextureFilter = 3 // 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. // // [Camera2D]: https://pkg.go.dev/graphics.gd/classdb/Camera2D // [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings FilterLinearMipmap TextureFilter = 4 // 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. [FilterNearestMipmap] is usually more appropriate in this case. // // [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings FilterNearestMipmapAnisotropic TextureFilter = 5 // 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. [FilterLinearMipmap] is usually more appropriate in this case. // // [ProjectSettings]: https://pkg.go.dev/graphics.gd/classdb/ProjectSettings FilterLinearMipmapAnisotropic TextureFilter = 6 // Represents the size of the [TextureFilter] enum. FilterMax TextureFilter = 7 )
type TextureRepeat ¶
type TextureRepeat int //gd:VisualShaderNodeTextureParameter.TextureRepeat
const ( // Sample the texture using the repeat mode determined by the node this shader is attached to. RepeatDefault TextureRepeat = 0 // Texture will repeat normally. RepeatEnabled TextureRepeat = 1 // Texture will not repeat. RepeatDisabled TextureRepeat = 2 // Represents the size of the [TextureRepeat] enum. RepeatMax TextureRepeat = 3 )
type TextureSource ¶
type TextureSource int //gd:VisualShaderNodeTextureParameter.TextureSource
const ( // The texture source is not specified in the shader. SourceNone TextureSource = 0 // The texture source is the screen texture which captures all opaque objects drawn this frame. SourceScreen TextureSource = 1 // The texture source is the depth texture from the depth prepass. SourceDepth TextureSource = 2 // The texture source is the normal-roughness buffer from the depth prepass. SourceNormalRoughness TextureSource = 3 // Represents the size of the [TextureSource] enum. SourceMax TextureSource = 4 )
type TextureType ¶
type TextureType int //gd:VisualShaderNodeTextureParameter.TextureType
const ( // No hints are added to the uniform declaration. TypeData TextureType = 0 // Adds source_color as hint to the uniform declaration for proper sRGB to linear conversion. TypeColor TextureType = 1 // Adds hint_normal as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. TypeNormalMap TextureType = 2 // Adds hint_anisotropy as hint to the uniform declaration to use for a flowmap. TypeAnisotropy TextureType = 3 // Represents the size of the [TextureType] enum. TypeMax TextureType = 4 )