Texture Module
Pipe-friendly helpers for configuring a loaded Texture2D.
raylib's texture filter is a property of the texture itself, set with
Raylib.SetTextureFilter. The Mibo loader (IAssets.Texture)
generates mipmaps and forces Trilinear filtering on every texture at
load time — good for 3D/PBR surfaces, but it makes tiles sampled from a
gutterless spritesheet bleed at the edges. Use these helpers to override
that per texture:
let assets = GameContext.getService<IAssets> ctx
let atlas = assets.Texture "tiles.png" |> Texture.filter TextureFilter.Point
init) — not every frame — since it mutates the
cached texture's sampler.
Functions and values
| Function or value |
Description
|
Full Usage:
filter filterMode tex
Parameters:
TextureFilter
-
The raylib TextureFilter to apply.
tex : Texture2D
-
The texture to configure (returned for piping).
Returns: Texture2D
Modifiers: inline |
Sets the texture's filtering mode, overriding the load-time default
(mipmaps +
|
|
Generates mipmaps for the texture (the Mibo loader already does this on load, so this is mainly useful for textures loaded outside the loader). raylib-cs mutates the texture byref and writes the mipmap count back into the same struct, so the returned texture must be used.
|
Full Usage:
wrap wrapMode tex
Parameters:
TextureWrap
-
The raylib TextureWrap to apply
(Clamp, Repeat, MirrorClamp, MirrorRepeat).
tex : Texture2D
-
The texture to configure (returned for piping).
Returns: Texture2D
Modifiers: inline |
Sets the texture's wrap (addressing) mode — how sampling handles texture
coordinates outside the
Use
|
Mibo