Skip to content

Samplers

Claude edited this page Oct 27, 2026 · 1 revision

Samplers

CreateSampler, SetTextureSampler and the SetSampler... commands are an extension. A sampler holds how a texture is read, and one sampler can be set on many textures. Without a sampler a texture is read with what its flags say. The modes are numbers:

Setting 0 1 2 3
Filters (SetSamplerFilterMin, Mag, Mip) Nearest Linear
Address modes (SetSamplerAddressModeU, V, W) Repeat Mirror Clamp Border (SetSamplerBorderColor, opaque black by default)

SetSamplerAnisotropy takes 1 (off) or more and is kept inside the limit of the graphics card, which is also what happens to SetSamplerLodBias. SetSamplerLodMin and SetSamplerLodMax count mip levels from level 0. A sampler does not make mip levels (flag 8 does, see Mip maps). Every setting can be read back with the GetSampler... commands (GetSamplerAnisotropy, GetSamplerBorderColorR to A and so on), which return what the sampler keeps. Without the VK_EXT_custom_border_color extension a border color is read as the closest of transparent black, opaque black and opaque white. FreeSampler sends the textures that use the sampler back to the settings of their flags.

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally