mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
minor re-org in sample_depth_texture()
This commit is contained in:
parent
2743def830
commit
c8cfbf7c19
1 changed files with 9 additions and 9 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue