cf_draw3d_anisotropy¶
Category: draw3d
GitHub: cute_draw3d.h
Sets anisotropic filtering for sprite atlas textures.
| Parameters | Description |
|---|---|
max_anisotropy |
Maximum anisotropy ratio. 1 (the default) disables it; 4 is a good |
| choice. Clamped to [1, 16]. |
Remarks¶
Mip selection alone is isotropic: it picks the level for the steepest screen-space uv derivative, so a sprite viewed edge-on in 3d -- a floor decal, a tilted standee -- blurs along the axis that never needed the coarser level. Anisotropic filtering takes several samples along the squashed axis instead, keeping oblique views sharp. It only has levels to choose from when cf_draw3d_mips is on -- enable both for sprites viewed at an angle. Costs proportionally more texture bandwidth; 4 captures most of the win. Calling this rebuilds the atlas, so call it at init alongside cf_draw3d_mips.
Related Pages¶
cf_draw3d_mips
cf_draw3d_sprite
cf_draw3d_billboard
cf_draw3d_push_texture