diff options
author | Brian Paul <[email protected]> | 2001-03-21 16:04:49 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-21 16:04:49 +0000 |
commit | c8cfbf7c19d7c3c213d5b48e1ef5ce5c19d3a656 (patch) | |
tree | fc453c37ffce1f356b026b02438458e96d21c0da /src/mesa | |
parent | 2743def830bc1dc3bedb302f13db3d65dc4705d7 (diff) |
minor re-org in sample_depth_texture()
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index a6ae844334e..6bbf4821197 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -1,4 +1,4 @@ -/* $Id: s_texture.c,v 1.16 2001/03/15 16:45:30 brianp Exp $ */ +/* $Id: s_texture.c,v 1.17 2001/03/21 16:04:49 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2405,19 +2405,19 @@ sample_depth_texture(const GLcontext *ctx, COMPUTE_NEAREST_TEXEL_LOCATION(texObj->WrapS, s[i], width, col); COMPUTE_NEAREST_TEXEL_LOCATION(texObj->WrapT, t[i], height, row); depthSample = *((const GLfloat *) texImage->Data + row * width + col); - if ((depthSample <= r[i] && lequal) || - (depthSample >= r[i] && gequal)) { - texel[i][RCOMP] = ambient; - texel[i][GCOMP] = ambient; - texel[i][BCOMP] = ambient; - texel[i][ACOMP] = CHAN_MAX; - } - else { + if ((r[i] <= depthSample && lequal) || + (r[i] >= depthSample && gequal)) { texel[i][RCOMP] = CHAN_MAX; texel[i][GCOMP] = CHAN_MAX; texel[i][BCOMP] = CHAN_MAX; texel[i][ACOMP] = CHAN_MAX; } + else { + texel[i][RCOMP] = ambient; + texel[i][GCOMP] = ambient; + texel[i][BCOMP] = ambient; + texel[i][ACOMP] = CHAN_MAX; + } } } else { |