Module tex

Module tex 

Source
Expand description

Textures and texture samplers.

Structs§

Atlas
SamplerClamp
A texture sampler that clamps out-of-bounds coordinates to the nearest valid coordinate in both dimensions.
SamplerOnce
A texture sampler that assumes all texture coordinates are within bounds.
SamplerRepeatPot
A texture sampler that repeats the texture infinitely modulo the texture dimensions. For performance reasons, SamplerRepeatPot only accepts textures with dimensions that are powers of two.
Tex
Basis of the texture space.
Texture
A texture type. Can contain either owned or borrowed pixel data.

Enums§

Layout
Method of arranging sub-textures in an atlas.

Functions§

cube_map
Returns a texture coordinate in a cube map.
uv
Returns a new texture coordinate with components u and v.

Type Aliases§

TexCoord
Texture coordinate vector. Texture coordinates can be either absolute, in range (0, 0)..(w, h) for some texture with dimensions w and h, or relative, in range (0, 0)..(1, 1), in which case they are independent of the actual dimensions of the texture.