diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-05-11 16:28:33 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-05-11 16:28:33 +0000 |
commit | ac6728d2d9208c4e8147b1ebfde50efdf37a8428 (patch) | |
tree | f80f62c794ee83d73f807be6da48ac75c6902039 /src/mesa/swrast/s_context.c | |
parent | 49d8cbe8d110e5c0a23300b5b82d110286bc3609 (diff) |
Previously in TXP and TEX instructions, lambda was passed to
fetch_texel as zero, but I believe this is incorrect. The spec uses a
pseudocode function:
vec4 TextureSample(float s, float t, float r, float lodBias,
int texImageUnit, enum texTarget);
to specify the behaviour of TEX, TXB and TXP instructions. For TEX
and TXP, lodBias is passed as zero, TXB is passed with texcoord[4]. In our code we have
static void
fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
GLuint unit, GLfloat color[4] )
and were passing zero and a biased lambda value respectively. The
difference is that TextureSample() would add in the lambda term
itself, while in our code the caller is expected to do this. Thus in
the TEX and TXP cases, it is necessary to pass an unbiased lambda
value for things to work out correctly.
Diffstat (limited to 'src/mesa/swrast/s_context.c')
0 files changed, 0 insertions, 0 deletions