diff options
author | Brian Paul <[email protected]> | 2001-03-28 21:37:24 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-28 21:37:24 +0000 |
commit | f1f288182ec07eddeefa591fce20fe69ce3744e2 (patch) | |
tree | ef8e301458ff6d02d8cf0b11c3e4606abe275662 /src/mesa/swrast/s_aatriangle.c | |
parent | 16a8e986cebae6560d00992b6b9f54549e1d03c6 (diff) |
adjustment to coverage sample positions
Diffstat (limited to 'src/mesa/swrast/s_aatriangle.c')
-rw-r--r-- | src/mesa/swrast/s_aatriangle.c | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c index df2182a0f0a..b64424e39a1 100644 --- a/src/mesa/swrast/s_aatriangle.c +++ b/src/mesa/swrast/s_aatriangle.c @@ -1,4 +1,4 @@ -/* $Id: s_aatriangle.c,v 1.10 2001/03/19 02:25:36 keithw Exp $ */ +/* $Id: s_aatriangle.c,v 1.11 2001/03/28 21:37:24 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -138,25 +138,26 @@ static GLfloat compute_coveragef(const GLfloat v0[3], const GLfloat v1[3], const GLfloat v2[3], GLint winx, GLint winy) { +#define B 0.125 static const GLfloat samples[16][2] = { /* start with the four corners */ - { 0.00, 0.00 }, - { 0.75, 0.00 }, - { 0.00, 0.75 }, - { 0.75, 0.75 }, + { 0.00+B, 0.00+B }, + { 0.75+B, 0.00+B }, + { 0.00+B, 0.75+B }, + { 0.75+B, 0.75+B }, /* continue with interior samples */ - { 0.25, 0.00 }, - { 0.50, 0.00 }, - { 0.00, 0.25 }, - { 0.25, 0.25 }, - { 0.50, 0.25 }, - { 0.75, 0.25 }, - { 0.00, 0.50 }, - { 0.25, 0.50 }, - { 0.50, 0.50 }, - { 0.75, 0.50 }, - { 0.25, 0.75 }, - { 0.50, 0.75 } + { 0.25+B, 0.00+B }, + { 0.50+B, 0.00+B }, + { 0.00+B, 0.25+B }, + { 0.25+B, 0.25+B }, + { 0.50+B, 0.25+B }, + { 0.75+B, 0.25+B }, + { 0.00+B, 0.50+B }, + { 0.25+B, 0.50+B }, + { 0.50+B, 0.50+B }, + { 0.75+B, 0.50+B }, + { 0.25+B, 0.75+B }, + { 0.50+B, 0.75+B } }; const GLfloat x = (GLfloat) winx; const GLfloat y = (GLfloat) winy; @@ -226,23 +227,23 @@ compute_coveragei(const GLfloat v0[3], const GLfloat v1[3], */ static const GLfloat samples[15][2] = { /* start with the four corners */ - { 0.00, 0.00 }, - { 0.75, 0.00 }, - { 0.00, 0.75 }, - { 0.75, 0.75 }, + { 0.00+B, 0.00+B }, + { 0.75+B, 0.00+B }, + { 0.00+B, 0.75+B }, + { 0.75+B, 0.75+B }, /* continue with interior samples */ - { 0.25, 0.00 }, - { 0.50, 0.00 }, - { 0.00, 0.25 }, - { 0.25, 0.25 }, - { 0.50, 0.25 }, - { 0.75, 0.25 }, - { 0.00, 0.50 }, - { 0.25, 0.50 }, + { 0.25+B, 0.00+B }, + { 0.50+B, 0.00+B }, + { 0.00+B, 0.25+B }, + { 0.25+B, 0.25+B }, + { 0.50+B, 0.25+B }, + { 0.75+B, 0.25+B }, + { 0.00+B, 0.50+B }, + { 0.25+B, 0.50+B }, /*{ 0.50, 0.50 },*/ - { 0.75, 0.50 }, - { 0.25, 0.75 }, - { 0.50, 0.75 } + { 0.75+B, 0.50+B }, + { 0.25+B, 0.75+B }, + { 0.50+B, 0.75+B } }; const GLfloat x = (GLfloat) winx; const GLfloat y = (GLfloat) winy; |