need to clamp MAD for linear fog
authorBrian <brian@yutani.localnet.net>
Mon, 16 Apr 2007 21:09:39 +0000 (15:09 -0600)
committerBrian <brian@yutani.localnet.net>
Mon, 16 Apr 2007 21:09:39 +0000 (15:09 -0600)
src/mesa/shader/programopt.c

index f1d8ce3065409ef98f5a734b587adb5054bc147f..fc5b0497fe369d51eca446e926300e6316e9e637 100644 (file)
@@ -199,6 +199,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
       inst->SrcReg[2].File = PROGRAM_STATE_VAR;
       inst->SrcReg[2].Index = fogPRefOpt;
       inst->SrcReg[2].Swizzle = SWIZZLE_Y;
+      inst->SaturateMode = SATURATE_ZERO_ONE;
       inst++;
    }
    else {