Can we use anisotropic filtering on 3D textures?

Do modern GPUs support anisotropic filtering for 3D textures? If yes, how can one use it? The OpenGL spec doesn't seem to be very precise on this. From this link:

Should anything particular be said about anisotropic 3D texture filtering?

Not sure.  Does the implementation example shown in the spec for
2D anisotropic texture filtering readily extend to 3D anisotropic
texture filtering?


I am not aware of hardware support for 3D anisotropic filtering. I could be wrong about its existence though. I believe it has been tried.

The motivation for 2D anisotropic filtering is to prefilter the texture function over the screen area it falls under in a more accurate way than doing a box filter in texture space (usually, anisotropic filtering does several box filters in texture space).

This definition is key. 2D anisotropic filtering tries to:

Integrate over the part of a flat surface that you can see
(within a single pixel on the screen).

What does 3D anisotropic filtering mean?

Integrate over the part of a . . . volume? . . . that you can . . . see?
(within a single . . . voxel? . . . on the screen)

The best analogue I can think of would be doing some sort of 3D texture lookup anisotropically along the viewing ray. This isn't quite a direct analogy. Anyway, the problem with this is that when you're doing volume rendering, you actually care about how this integration is done a lot more than in the 2D case.

Do you want absorption? Emission? (You need to do some kind of exponential to integrate.) Do you want scattering? (You need to do some kind of recursion or approximating blur to integrate). And this doesn't even get into what kind of data the 3D texture stores. Does this texture mean opacity, or does it mean density? Is it diffuse or is it emission? All of these need to be integrated differently.

New developments in volume rendering are happening all the time, and in any case there are so many variously suboptimal ways you could try to generalize 2D anisotropic filtering, the doubt expressed by the specification makes sense to me:

Does the implementation . . . for 2D anisotropic texture filtering readily extend to 3D anisotropic texture filtering?

No.

• It does extend to 3D. For example, you could consider that, when texturing (a portion of) a triangle, you are, in effect, evaluating a surface cut through the 3D texture. That shape doesn't have to be isotropic. Alternatively, just like a 2D anisotropic filtering may approximate with an elliptical footprint, the 3D version could use an ellipsoid. – Simon F Sep 7 '15 at 15:09
• @SimonF Hmmm, you're right! That is actually I think perhaps a better generalization than the one I gave, and it seems better behaved (as in, it's more obvious what to do). – imallett Sep 7 '15 at 16:51