Filter between mip levels and use anisotropy #76

Closed
opened 2026-10-20 08:49:23 +00:00 by sermuns · 0 comments
Owner

The texture sampler asks for linear magnification and minification but leaves
mipmap_filter at wgpu's default Nearest and anisotropy_clamp at 1
(texture_sampler, liuverse-render/src/renderer.rs). Every textured surface
then snaps between mip levels instead of blending, and the ones that matter are
exactly the ones seen at distance: bark, leaves and the emblem atlas.

Two effects:

  • Popping and shimmer in the forest as the camera moves, worst on the leaves,
    which are alpha-tested cards.
  • Anisotropy of 1 smears those textures along glancing angles, so a path lined
    with trees is blurry precisely where the eye follows it.

Set mipmap_filter to MipmapFilterMode::Linear and anisotropy_clamp to
something like 8 clamped by Limits::max_anisotropy, falling back to 1 where the
adapter reports none. The mip chain is already built on the GPU by MIP_BODY, so
nothing else has to change.

Related: #86 would make the missing tangents visible in the same
place.

The texture sampler asks for linear magnification and minification but leaves `mipmap_filter` at wgpu's default `Nearest` and `anisotropy_clamp` at 1 (`texture_sampler`, `liuverse-render/src/renderer.rs`). Every textured surface then snaps between mip levels instead of blending, and the ones that matter are exactly the ones seen at distance: bark, leaves and the emblem atlas. Two effects: - Popping and shimmer in the forest as the camera moves, worst on the leaves, which are alpha-tested cards. - Anisotropy of 1 smears those textures along glancing angles, so a path lined with trees is blurry precisely where the eye follows it. Set `mipmap_filter` to `MipmapFilterMode::Linear` and `anisotropy_clamp` to something like 8 clamped by `Limits::max_anisotropy`, falling back to 1 where the adapter reports none. The mip chain is already built on the GPU by `MIP_BODY`, so nothing else has to change. Related: #86 would make the missing tangents visible in the same place.
sermuns added this to the Rendering milestone 2026-10-20 08:49:23 +00:00
Sign in to join this conversation.
No description provided.