diff options
author | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-02-09 19:21:29 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-02-09 19:21:29 +0100 |
commit | b2d30ca0cb01a80ff440a4a07b293daa16486e12 (patch) | |
tree | ca1cc1841bc3bda1a4830994a27a5a3a59b71519 /src/mesa/shader/program.c | |
parent | fcccf8943213a20957f305161e8aae7fef55baab (diff) |
optimize per-pixel fog program
use the same internal state as for vertex fog. From the old implemenentation,
this changes a SUB+MUL into a MAD for linear fog, and saves a MUL for EXP/EXP2,
plus saves a (constant) parameter. While here, fix the broken (forgotten)
swizzling. (untested)
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r-- | src/mesa/shader/program.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 7e6cd26c55..490f919445 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -997,7 +997,7 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], break; } case STATE_FOG_PARAMS_OPTIMIZED: - /* this makes it possible to use simpler per-vertex fog calcs. POW + /* for simpler per-vertex/pixel fog calcs. POW (for EXP/EXP2 fog) might be more expensive than EX2 on some hw, plus it needs another constant (e) anyway. Linear fog can now be done with a single MAD. |