Expand description
Texture resources, sampler state, and per-triangle sampling for the 3D path.
The 3D rasterizer previously had no way to represent an image on a mesh, so tile imagery could not be drawn at all. This module provides the minimum a renderer needs: an RGBA texture store with stable handles, sampler state (filter and address mode), and a UV transform that maps a tile’s sub-rect of a loaded ancestor texture onto a unit quad.
Sampling is perspective correct: callers interpolate u/w and v/w
alongside 1/w, then divide. See crate::rasterizer3d.
Structs§
- Sampler
Desc - Sampler state for one texture.
- Texture
- A stored texture: payload plus sampler state.
- Texture
Data - A described texture payload.
- Texture
Desc - Immutable texture description.
- Texture
Id - Opaque handle to a texture in a
TextureStore. - Texture
Store - Registry of textures addressable by
TextureId. - UvTransform
- An affine transform applied to texture coordinates before sampling.
Enums§
- Address
Mode - Out-of-range behaviour for texture coordinates.
- Filter
Mode - Minification and magnification filtering.
- Texture
Format - Pixel layout of a texture.
Functions§
- sample_
bilinear_ clamped - Bilinear sample with clamped addressing, the tile path.
- sample_
texture - Samples one texture. Pure function so the rasterizer can call it per pixel without touching the store’s hash map.