summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_fragprog.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-12-04 14:06:10 -0700
committerBrian <[email protected]>2007-12-04 14:07:08 -0700
commit02afd45d3b2eccff5d566cdeb32b3211803bd500 (patch)
tree7396a68565fdea10c9ead9c0df61654a66d56629 /src/mesa/swrast/s_fragprog.c
parent2ee7035886d9f857677776f84e55f92153318832 (diff)
fix span->facing computation and gl_FrontFacing initialization
Diffstat (limited to 'src/mesa/swrast/s_fragprog.c')
-rw-r--r--src/mesa/swrast/s_fragprog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 767e485ede2..76c79eb0d81 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -120,7 +120,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
/* if running a GLSL program (not ARB_fragment_program) */
if (ctx->Shader.CurrentProgram) {
/* Store front/back facing value in register FOGC.Y */
- machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = (GLfloat) span->facing;
+ machine->Attribs[FRAG_ATTRIB_FOGC][col][1] = 1.0 - span->facing;
}
machine->CurElement = col;