summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texcombine.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-06 14:38:09 -0600
committerBrian Paul <[email protected]>2009-04-06 14:38:09 -0600
commit87c356a222bb97ecf9b04e8d509b103199159b11 (patch)
treef1cc558f56eac0c59af7081e9515f026ba3846e5 /src/mesa/swrast/s_texcombine.c
parent89276e2aafd837dbf4eefaa28388109271d6d07d (diff)
swrast: fix incorrect arithmetic for GL_ADD_SIGNED/GL_COMBINE4_NV mode
Diffstat (limited to 'src/mesa/swrast/s_texcombine.c')
-rw-r--r--src/mesa/swrast/s_texcombine.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 2c694c25cba..08752f34331 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -316,12 +316,12 @@ texture_combine( const GLcontext *ctx, GLuint unit, GLuint n,
if (textureUnit->EnvMode == GL_COMBINE4_NV) {
/* (a * b) + (c * d) - 0.5 */
for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] *
- arg2[i][RCOMP] + arg3[i][RCOMP] - 0.5) * scaleRGB;
- rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] *
- arg2[i][GCOMP] + arg3[i][GCOMP] - 0.5) * scaleRGB;
- rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] *
- arg2[i][BCOMP] + arg3[i][BCOMP] - 0.5) * scaleRGB;
+ rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] +
+ arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5) * scaleRGB;
+ rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] +
+ arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5) * scaleRGB;
+ rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] +
+ arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5) * scaleRGB;
}
}
else {