Struct SamplerInfo

Structure holding texture sampler information. It is used to create samplers.

struct SamplerInfo ;

Fields

NameTypeDescription
anisotropy Option!(float)Enables anisotropy filtering. The value set serves as maximum covering fragments.
borderColor BorderColor
compare Option!(gfx.graal.pipeline.CompareOp)Enables a comparison operation during lookup of depth/stencil based textures. Mostly useful for shadow maps.
lodBias float
lodRange float[2]
magFilter FilterThe magnification filter
minFilter FilterThe minification filter
mipmapFilter FilterThe filter used between mipmap levels
unnormalizeCoords std.typecons.Flag!("unnormalizeCoords")If set, lookup is done in texel space rather than normalized coordinates.
wrapMode WrapMode[3]The wrap mode for look-ups outside of [ 0 , 1 ] in the three axis

Properties

NameTypeDescription
bilinear[get] SamplerInfoInitializes a bilinear filtering SamplerInfo
nearest[get] SamplerInfoInitializes a non-filtering SamplerInfo
trilinear[get] SamplerInfoInitializes a trilinear filtering SamplerInfo (that is also linear between mipmap levels)

Methods

NameDescription
withCompareOp (op) Enables comparison operation for depth/stencil texture look-ups. Use this with shadow samplers.
withWrapMode (mode) Set the wrap mode for the 3 axis