diff options
author | Andreas Faenger <[email protected]> | 2011-05-18 08:14:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-05-18 08:14:33 -0600 |
commit | 8a98aabe0bcea42cfdc982001ae4876e3d9b1214 (patch) | |
tree | 2802b7b6975dac6f42243ee7ad01476cd9ebbb87 /src/mesa/swrast/s_span.c | |
parent | 707eadcb7f603e803978a541a16e9893663c33e2 (diff) |
swrast: anisotropic filtering extension
Anisotropic filtering extension for swrast intended to be used by osmesa
to create high quality renderings.
Based on Higher Quality Elliptical Weighted Avarage Filter (EWA).
A 2nd implementation using footprint assembly is also provided.
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r-- | src/mesa/swrast/s_span.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index f0524e0610e..f81de3c0c7b 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -492,6 +492,13 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span) const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; needLambda = (obj->Sampler.MinFilter != obj->Sampler.MagFilter) || ctx->FragmentProgram._Current; + /* LOD is calculated directly in the ansiotropic filter, we can + * skip the normal lambda function as the result is ignored. + */ + if (obj->Sampler.MaxAnisotropy > 1.0 && + obj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + needLambda = GL_FALSE; + } texW = img->WidthScale; texH = img->HeightScale; } |