I played around with pixel shaders a bit and found a (not too fast) way to achieve angle-independent anisotropic filtering on cards that don't support this feature.
It needs PS 2.x so unfortunately it doesn't work on currently available Radeon cards.
These are some of the results on a Geforce 6800 GT:
Original AF 16x
Angle independent AF 16x
The trick is done with the following shader function:
It's only good for square textures in it's current form, it needs some scaling for rectangles.
I might release the test program after some cleanup.
It needs PS 2.x so unfortunately it doesn't work on currently available Radeon cards.
These are some of the results on a Geforce 6800 GT:
Original AF 16x
Angle independent AF 16x
The trick is done with the following shader function:
Code:
float4 tex2D_ai(sampler2D tx, float2 coord)
{
float2 dx = ddx(coord);
float2 dy = ddy(coord);
float a = dot(dx, dx) - dot(dy, dy);
float b = 2*dot(dx, dy);
a = a / sqrt(a*a + b*b);
b = sqrt(0.5 - 0.5*a) * sign(b);
a = sqrt(0.5 + 0.5*a);
return tex2D(tx, coord, dx * a + dy * b, dy * a - dx * b);
}
It's only good for square textures in it's current form, it needs some scaling for rectangles.
I might release the test program after some cleanup.