Filter between mip levels and use anisotropy #118

Merged
sermuns merged 2 commits from feat/76-mipmap-anisotropy into main 2026-10-21 08:42:48 +00:00
Owner

Both textured samplers are now built from one descriptor, so the mip filter
cannot drift apart between them, and the anisotropy is clamped to what the
adapter reports, falling back to one where the adapter reports none.

Note on the premise: on main the mip filter was already Linear and the
anisotropy was a hardcoded 8, so the visible change is small. What this adds
is the adapter check the issue asked for, and one place where the sampler is
built.

closes #76

How to test

Walk a tree-lined path through the woodland and look along it: bark and the
ground tile stay sharp at a glancing angle, and the leaves and the emblem
atlas fade into the distance instead of snapping between mip levels.

The change is invisible on a machine with anisotropic filtering; it shows up
as correct behaviour on one without.

A 👍 reaction on this pull request flags it for merge.

Both textured samplers are now built from one descriptor, so the mip filter cannot drift apart between them, and the anisotropy is clamped to what the adapter reports, falling back to one where the adapter reports none. Note on the premise: on `main` the mip filter was already `Linear` and the anisotropy was a hardcoded `8`, so the visible change is small. What this adds is the adapter check the issue asked for, and one place where the sampler is built. closes #76 ## How to test Walk a tree-lined path through the woodland and look along it: bark and the ground tile stay sharp at a glancing angle, and the leaves and the emblem atlas fade into the distance instead of snapping between mip levels. The change is invisible on a machine with anisotropic filtering; it shows up as correct behaviour on one without. A 👍 reaction on this pull request flags it for merge.
The textured samplers already filtered linearly between mip levels, but the
anisotropy was a hardcoded request that no adapter check backed. Pick it from
what the adapter reports instead, falling back to one where anisotropic
filtering is missing, and build both samplers from one descriptor so the
mip filter cannot drift.
Author
Owner

I don't see any difference. But fuckit we ball.

I don't see any difference. But fuckit we ball.
sermuns force-pushed feat/76-mipmap-anisotropy from 3c8dde16f8 to fc3c739749 2026-10-21 08:42:47 +00:00 Compare
Sign in to join this conversation.
No description provided.